Thanks to visit codestin.com
Credit goes to github.com

Skip to content

git-upstream fails for now repositories #72

@Brickster

Description

@Brickster
$ git init test
Initialized empty Git repository in /private/tmp/test/.git/
$ cd test
$ git upstream
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Traceback (most recent call last):
  File "/Users/marcus/Development/python/git-commands/bin/git-upstream", line 50, in <module>
    main()
  File "/Users/marcus/Development/python/git-commands/bin/git-upstream", line 45, in main
    upstream_output = upstream.upstream(**vars(parser.parse_args()))
  File "/Users/marcus/Development/python/git-commands/bin/commands/upstream.py", line 26, in upstream
    branch = git.current_branch()
  File "/Users/marcus/Development/python/git-commands/bin/commands/utils/git.py", line 94, in current_branch
    return check_output(('git', 'rev-parse', '--abbrev-ref', 'HEAD')).strip()
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 574, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '('git', 'rev-parse', '--abbrev-ref', 'HEAD')' returned non-zero exit status 128

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions