I have recently upgraded from ubuntu 14.04 to 14.10 using apt-get dist-upgrade, which seems to have gone smoothly, except that I can no longer use one of my git repositories (on which I had local commits that have not been pushed).

Whenever I run a git command, such as git status I now received the following message:

fatal: Reference has invalid format: 'refs/stash (1)'

I tried git stash clear thinking that this might be due to a corrupted stash list, but that had no effect (the command ran without errors or outputs, and I am still getting the above error).

Before I diff my files manually and create a new repo altogether, is there anything I can try to recover this local repository? I am using git 2.1.0


I think the issue was related to other questions after all even though the error message was different. My home directory is sym-linked to a cloud drive which apparently had some conflicts which it resolved by suffixing some files with (1). Apparently git didn't like this, although I'm not sure why it would care about additional files in its directories (I don't know a lot about git internals...)

I ended up just doing a diff between my local repo and the remote, nuking the directory, re-copying and applying the .patch file.


You may be able to solve it by going into .git/refs/ and removing the stash (1) file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.