I have a very, very old file in my Git repo that's had numerous commits to it. By chance, I wanted to compare it to a previous revision but I found that git diff 5.0 Data/schema.sql
simply returned no output.
I knew this was wrong, so I ran git log Data/schema.sql
. Again: no output!
I thought this could be a gitignore problem, so I completely removed my .gitignore
file - no change. I even tried git config --global --get-all core.excludesfile
and git config --system --get-all core.excludesfile
- both returned no output.
I tried manually adding it with git add
. There was no error message, but the file is not mentioned at all in git status
- git is acting as if I told it to ignore the file, and on top of that, seems to have made its history inaccessible.
What on earth could be going on? This makes me nervous - this one file's history is not a big deal on its own, but I'm worried that something could be wrong/corupt with my repo as a whole.
What could cause this behavior and how can I fix it? I'm running the latest git (1.8.3.1) on Mac OS X (installed via Homebrew). Other files in the Data
directory work as expected, and no other files in the repo exhibit this behavior.