I have created an empty Git repository in Atlassian Stash and cloned it.
$ git clone http://me@myrepo/my/repo.git
...
warning: You appear to have cloned an empty repository.
Then I've created some files, added them via git add
and wanted to commit via git commit
. I get the following error:
ERROR: Unable to determine active branch in current context !
ERROR: GITLib::Branch::get_current died at line 41
When I do git rev-parse HEAD
I get:
$ git rev-parse HEAD
HEAD
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
When I issue git branch -a
to see if there are any remote branches, the output is empty.
Let's create a branch locally:
$ git checkout -b "foo"
Switched to a new branch 'foo'
$ git commit -m "test"
ERROR: Unable to determine active branch in current context !
ERROR: GITLib::Branch::get_current died at line 41
How do I get my repo in a workable state?
I tried issuing git commit --allow-empty
, git init
but it didn't change anything.
Edit:
When I just create an empty repo locally with git init
, then git add
and try to git commit
similar happens:
ERROR: GIT::Command::git_or_die died at line 164
Edit 2:
It seems an internal issue due to a hook in my company. I'll follow up with details if this gets resolved.
Using Git Bash 1.8.5.2 @ Win7.