This is absolutely infuriating. I haven’t gotten any work done all morning. When ever I stage a file ‘foo/bar.coffee’, another COMPLETELY UNCHANGED file ‘foo/map.coffee’ also stages itself. I try to reset the repository to HEAD, no files are staged. I stage bar.coffee, now two files are staged. And the file map.coffee isn’t even modified. In the diff (after it is staged) it shows every line of the file with a “-” in front of it, as if I had staged it for deletion.
This is how the diff comments at the top of map.coffee looks like after it has been staged:
diff --git a/src/controllers/map.coffee b/src/controllers/map.coffee deleted file mode 100755 index e4d5d3b..0000000 --- a/src/controllers/map.coffee +++ /dev/null
I have tried checking out a fresh map.coffee with no success, it keeps staging itself for deletion whenever I stage a file. Why is this?
No reset or checkout helped, so I ended up checking out the remote develop branch into a new folder, then merging the new folder with the old one (except the .git folders.) All the changes in the working directory since the last push ended up as unstaged changes which I just committed piece by piece.
I’m pretty sure it was the Git GUI’s “archive compression” that caused this issue to begin with, since this all started the day I mistakenly clicked “yes” instead of “no”.