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