title: Git refs/remotes/origin/master does not point to a valid object
body: <p>After the last merge to the master branch of my Git repository I have lost the ability to clone repository.</p>
  
  <pre>
  Cloning into test-repository...
  remote: Counting objects: 126084, done.
  remote: Compressing objects: 100% (28327/28327), done.
  Receiving objects: 100% (126084/126084), 132.63 MiB | 29.30 MiB/s, done.
  remote: Total 126084 (delta 96101), reused 126078 (delta 96095)
  Resolving deltas: 100% (96101/96101), done.
  error: refs/remotes/origin/master does not point to a valid object!
  error: Trying to write ref refs/heads/master with 
         nonexistant object 951aca8051823b2f202d30c9cb05401ef17618c6
  </pre>
  
  <p>Fisheye, a repository hosting tool, is reporting:</p>
  
  <pre>
  Unable to fetch from remote repository:
  /var/atlassian/application-data/fisheye/managed-repos/MYREPONAME.git
  error: unable to find 0d998c99b6d01e8aabca72b1934802acf90b8fc9,
  fatal: object 0d998c99b6d01e8aabca72b1934802acf90b8fc9 not found
  </pre>
  
  <p>The last commit in the repository on master branch is:</p>
  
  <pre>
  commit 0d998c99b6d01e8aabca72b1934802acf90b8fc9
  Merge: a6ea4b3 1f373a9
  Date:   Fri Dec 14 13:57:24 2012 +0200
  
  Merge branch 'new_error_code'
  </pre>
  
  <p>I have tried:</p>
  
  <pre><code>cd /var/atlassian/application-data/fisheye/managed-repos/MYREPONAME.git
  git gc
  git fsck --full
  git reflog expire --expire=0 --all
  git update-ref
  git gc --aggressive
  </code></pre>
  
  <p>The following questions did not help my case:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/801577/how-to-recover-git-objects-damaged-by-hard-disk-failure">How to recover Git objects damaged by hard disk failure?</a></li>
  <li><a href="https://stackoverflow.com/questions/10097069/fatal-error-after-github-automatic-merge">Fatal error after GitHub automatic merge</a></li>
  <li><a href="https://stackoverflow.com/questions/3765234/listing-and-deleting-git-commits-that-are-under-no-branch-dangling">Listing and deleting Git commits that are under no branch (dangling?)</a></li>
  </ul>