1

I'm experiencing the "file name too long" error described in another question. I've already fixed the file name in a remote repo, and now I'm trying to merge in the changes from the remote that fix the name. However, git won't let me merge because it thinks I have uncommitted changes (the too-long-named file it can't create). Is there some way to force git to merge? Note that git status lists no modifications, besides printing the file name too long error, so I don't see how to satisfy git first locally. In particular, git does not report the file as rm'd or missing.

Community
  • 1
  • 1
ntc2
  • 11,203
  • 7
  • 53
  • 70
  • First `git fetch` then try: `git update-ref /` – Op De Cirkel Jun 04 '12 at 07:44
  • @OpDeCirkel: that command seems to be a no-op for me. I also tried `git update-ref --no-deref /`. (The fix below already worked, and git won't let me `reset --hard` back to the messed up commit, but I am able to branch to it.) – ntc2 Jun 04 '12 at 07:54

1 Answers1

1

I was able to resolve the problem by doing a git reset --hard <remote>/<branch>.

ntc2
  • 11,203
  • 7
  • 53
  • 70