I have a git repo that has about 3 or 4 months worth of code. Is there a way to tell git to stop tracking files before a certain commit?
views:
37answers:
2
A:
The following command will stop tracking but keep the file there intact.
git rm --cached filename
and then use a .gitignore file with the filename in it to stop future tracking of that file.
Skawouter
2010-10-18 09:37:36
*before* a certain commit.
mathepic
2010-10-19 00:35:41
A:
See http://www.kernel.org/pub/software/scm/git/docs/git-filter-branch.html
In fact, the example given is perfect! (slightly modified)
git filter-branch --index-filter 'git rm --cached --ignore-unmatch filename' <COMMIT>
mathepic
2010-10-19 00:38:09