I need to ignore files in git! I don't think ignore is the right word actually; I want the files to be in git, but I don't want to be able to commit changes to them. This may seem like a weird thing to some, but there are many, many instances that I need this functionality. The one instance I need it for now is when using git with a CMS; the CMS won't work without files that it is constantly changing, but I don't want those files to ever be committed after the initial commit. (This is very easy to do with SVN and Tortoise).
WorkFlow:
Here is what I've tried:
.gitignore
-- the files never enter git. If the file is already in
cache the .gitignore file doesn't do anything./.git/info/exclude
-- same problem as .gitignore, but only for
the local repo.Here is my answer from a similar question.
git update-index should do what you want
This will tell git you want to start ignoring the changes to the file
git update-index --assume-unchanged path/to/file
When you want to start keeping track again
git update-index --no-assume-unchanged path/to/file