Reputation: 2151
I've been having issues with one of my git repos deleting all files on commit.
I looked inside the project's .git directory and found a gob of indexes. Check it out:
$ ls .git
COMMIT_EDITMSG index (from Niflheimr - 2)
FETCH_HEAD index (from Niflheimr - 3)
HEAD index (from Niflheimr - 4)
ORIG_HEAD index (from Niflheimr - 5)
config index (from Niflheimr - 6)
description index (from Niflheimr - 7)
github-mac-index index (from Niflheimr - 8)
hooks index (from Niflheimr - 9)
index (from Niflheimr - 10) index (from Niflheimr)
index (from Niflheimr - 11) info
index (from Niflheimr - 12) logs
index (from Niflheimr - 13) objects
index (from Niflheimr - 14) refs
index (from Niflheimr - 15) sequencer
index (from Niflheimr - 16)
I think they're bad and they should go away. I'm not sure what the git way would be to heal this and what I can do to prevent this in the future.
Upvotes: 1
Views: 527
Reputation: 332776
It sounds like there's a bug in GitHub for Mac. I would try reporting it to them, at [email protected]. GitHub for Mac is not open source, and doesn't have much documentation available online, so it would probably be best to just ask them about it.
In order to clean up your Git repository, just try cloning it into a new repository. That should keep all of your history, while giving you fresh indexes so that you don't have all of that stuff junking up your .git
.
Upvotes: 1