title: GIT: fatal: could not parse HEAD Error When Committing
body: <p>When trying to commit with</p>
  
  <pre><code>git commit -a -m "Huge update"
  </code></pre>
  
  <p>I get</p>
  
  <blockquote>
    <p>fatal: could not parse HEAD Error When Committing</p>
  </blockquote>
  
  <p>After reading <a href="https://stackoverflow.com/questions/14449372/fatal-could-not-parse-head-error-when-committing">fatal: could not parse HEAD Error When Committing</a> I commanded</p>
  
  <pre><code> git symbolic-ref HEAD refs/heads/master
  </code></pre>
  
  <p>but got no output, but I did get</p>
  
  <pre><code>$ git fsck
  Checking object directories: 100% (256/256), done.
  error: HEAD: invalid sha1 pointer c45fd8579e1f313fcd651df4cbafbf6c8f8edba6
  error: refs/heads/master does not point to a valid object!
  error: refs/remotes/origin/master does not point to a valid object!
  notice: No default references
  broken link from  commit f10ca5f9234acb473ee000414e2c7d4e939b5e57
                to    tree 08a537c82c15e09badb41540ceadfb6ac1a8bb31
  dangling blob 03165e2de43b743cfe049c40d0ede67fcfb3cc50
  missing tree 08a537c82c15e09badb41540ceadfb6ac1a8bb31
  dangling blob 1d5469bbebc0a347feef8c0d04fdbf54d87c0a84
  dangling blob 1d29ed6cbea9e49273f072de1c61d6893c60a938
  dangling blob 259577cbf5a72f6a3565fabb8ce84dc1c7953263
  missing blob 3e2a6250392ee3148da37c6c140fc27302125efd
  dangling blob 5474b368e2be10dc252d9e21942e748b2d87bd8c
  dangling blob 743f1a142592da8050327a6d2e8acc9b5caface7
  dangling blob 74823e581bb2cd05256fb4c53109ab6690164077
  dangling blob 8399f1b02b73271337addc62e1cc0655a3437a9e
  missing blob 99e63739e12ac210f709cc7d5426b46c6b869b65
  dangling blob ba11541ed0813e1310b0d721c558f77197854f1f
  dangling blob bab5ebd6dfda1be835d15c7704e192e6a9372404
  missing blob ca265d70b113843c3080fcb29e14ddb7c50c55a2
  missing commit d5750c2c0c209f95d1d6bbd8f763756302fa31b9
  dangling blob ebfe8060c0c12ec4b9c7ebebcedbf6c33f435a32
  dangling blob f16d2a532c3720bbeb14334a47dc5835532d9841
  </code></pre>
  
  <p>I might be mistaken, but think git told me to go an f*** myself :-D... :,-/. The following seems to confirm this:</p>
  
  <pre><code>$ git status
  fatal: bad object HEAD
  $ git checkout master
  fatal: Reference is no "Tree"-object: master
  $ git fetch
  error: refs/heads/master does not point to a valid object!
  error: refs/remotes/origin/master does not point to a valid object!
  $ git reflog master
  fatal: bad object master
  $ git reflog HEAD
  fatal: bad object HEAD
  </code></pre>
  
  <p>Is there still a way to reconcile with git?</p>
  
  <p>I  also get</p>
  
  <pre><code>$ cat .git/refs/heads/master
  c45fd8579e1f313fcd651df4cbafbf6c8f8edba6
  $ cat .git/refs/remotes/origin/master
  c45fd8579e1f313fcd651df4cbafbf6c8f8edba6
  </code></pre>