How do I untrack CVS folders after using git
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?
.gitignore
only causes git to ignore untracked files. "CVS" is already tracked so you must first remove it from the repository with:
git rm -r --cached CVS
The --cached
option causes git to leave the working copy of the file intact rather than removing it. Once done, the entry in .gitignore
will prevent git from interacting with the CVS directory again.
How do I make git stop tracking the CVS folders once it's decided to track them?
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.
链接地址: http://www.djcxy.com/p/23396.html上一篇: Git仍会添加并跟踪标记为.gitignore的文件夹
下一篇: 如何在使用git之后解开CVS文件夹