Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to recover from git-svn putting a different cased dulplicate file in the repository?

Git-svn allowed for a duplicate filename, just with different case, to be added to our subversion repository.

On Windows this meant that subversion could not checkout the file, complaining of a duplicate.

Another developer deleted the incorrectly cased version from the repository. Now when trying to do a git-svn rebase I get a "could not detach HEAD" message and a complaint about the file name in question being untracked and needing to be overwritten. Deleting the file makes git-svn complain that the file needs to be updated.

Is the only solution to copy the repository to a machine with a case sensitive filesystem do the rebase then move it back?

I understand that git-svn isn't ready for real world work on Windows but I'd like to recover from this mess it has created.

like image 512
toholio Avatar asked Aug 04 '09 04:08

toholio


1 Answers

Best current answer (I don't know if this existed back when this was originally posed):

git config core.ignorecase true

Then redo the rebase. It will proceed without error -- and will even properly handle the case change in the filename.

This isn't specific to git-svn. It can happen in a straight 'git rebase'.

I hope that helps the next person....

like image 156
Bob Kerns Avatar answered Sep 17 '22 11:09

Bob Kerns