Possible Duplicates:
working with .git/info/exclude too late
.gitignore file not ignoring
git – removing a file from source control (but not from the source)
I have CVS/ in my both .gitignore and my .git/info/exclude files. But for some reason changes to any CVS folder are still tracked.
I’m tired of having to manually un-stage changes in these folders.
How do I make git stop tracking the CVS folders once it’s decided to track them?
.gitignoreonly causes git to ignore untracked files. “CVS” is already tracked so you must first remove it from the repository with:The
--cachedoption causes git to leave the working copy of the file intact rather than removing it. Once done, the entry in.gitignorewill prevent git from interacting with the CVS directory again.Git will never “decide” to track content, it does only what you tell it to. At some point you manually added it to the index and then committed it to the repository.