On Mar 25, 2018, at 21:40, Rainer Müller wrote: > On 2018-03-26 04:05, Ryan Schmidt wrote: >> I ended up fixing it by copying the entire clone to a case-sensitive HFS+ >> disk image, running "git checkout gis/LASzip" and "git checkout gis/laszip", >> then copying the clone back to my case-insensitive HFS+ disk. If there was >> an easier way to fix this, I'd love to know it for future reference. > > Let's go back to the broken commit and simulate this on a new branch: > > $ git checkout -b laszip-broken e3710d6800e803ebaa9528d3bdb38fb2fcade513 > $ git st -s > M gis/laszip/Portfile > > The problem here is that you cannot get rid of local changes in the > working tree, because two paths share the same file on disk. Every time > you checkout one of the files, the other file no longer matches what git > expects and is considered modified. > > You can break that by deleting the file from disk, so both paths known > by git will have a consistent state on disk: deleted. > > $ rm gis/laszip/Portfile > $ git st -s > D gis/LASzip/Portfile > D gis/laszip/Portfile > > Now we can pull the latest changes from the remote, which includes the > commit that removed one of the files. Of course the deleted file is > still missing, so git still considers this an uncommitted modification. > > $ git pull origin master > ... > $ git st -s > D gis/laszip/Portfile > > To get rid of this state, we discard the local modification and restore > the file with git checkout. > > $ git checkout gis/laszip/Portfile > $ git st -s > $ > > Now the working tree is clean again.
Thanks, I'll save your mail for future reference, in case a case collision happens again. I know I tried deleting both paths from disk, but then I must have used "git checkout" on one of the paths to try to get the clone into a clean state, which I guess reintroduced the problem. The commands that I have put into my notes, which I copy/paste into the Terminal every time I want to bring changes from upstream into my clone of my fork, are: git checkout master git fetch upstream git rebase upstream/master Whenever I try to use those commands, but my clone of my fork is not in a clean state, I get an error (Cannot rebase: You have unstaged changes. Please commit or stash them.), so that's why I was trying to get my clone into a clean state before proceeding.