I have some local changes in a file, .classpath with respect to the remote repository. (Yes, I know I shouldn't have the classpath files in the shared repo, but that's a different story.)
This proves that there are some local changes:
$ git checkout master
error: Your local changes to the following files would be overwritten by checkout:
PhotoFeed/.classpath
Please, commit your changes or stash them before you can switch branches.
Aborting
However, they don't appear in git status:
$ git status
# On branch release-1.5.1
nothing to commit, working directory clean
This file is not in .gitignore, as this commands proves:
$ git status --ignored
# On branch release-1.5.1
# Ignored files:
# (use "git add -f <file>..." to include in what will be committed)
#
# .metadata/
# PhotoFeed/.settings/
# PhotoFeed/bin/
I've also tried to remove it from the assume-unchanged, but it doesn't change anything:
$ git update-index --no-assume-unchanged PhotoFeed/.classpath
It can't be added to the staging area. I can do git add -f on it, but git commit keeps saying that there is nothing to commit.
How can I make this file be "normal" again? I want to be able to diff on it, commit it, or maybe just git rm it. That is, what other git config file/flag/property may be hiding this file?
There is another git config file that is used to ignore files: .git/info/exclude
The difference between the files exclude and .gitignore is that the former is not versioned, is for your personal use. For instance, to exclude files from your IDE or your OS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With