$ git changes -h
error: '/Users/marcus/Development/python/git-commands/bin' not a git repository
$ git changes -v
error: '/Users/marcus/Development/python/git-commands/bin' not a git repository
It's even worse when no parent is a git repository.
$ cd /tmp
$ git changes -h
fatal: Not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
File "/Users/marcus/Development/python/git-commands/bin/git-changes", line 6, in <module>
from commands import changes, settings, upstream
File "/Users/marcus/Development/python/git-commands/bin/commands/changes.py", line 46, in <module>
def unassociate(branch=git.current_branch(), cleanup=None, quiet=False):
File "/Users/marcus/Development/python/git-commands/bin/commands/utils/git.py", line 93, in current_branch
return check_output(('git', 'rev-parse', '--abbrev-ref', 'HEAD')).strip()
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '('git', 'rev-parse', '--abbrev-ref', 'HEAD')' returned non-zero exit status 128
Even if not a git repository, you should still be able to run
git changes --helporgit changes --version.It's even worse when no parent is a git repository.