Git – How to Ignore Tracked Files

git

I have some tracked files in a repository which are automatically modified when building the code. I don't want to untrack them, I just don't want them to appear as modified and I don't want them to be staged when I git add.

Is this possible?

Best Answer

Sure.

git update-index --assume-unchanged [<file> ...]

To undo and start tracking again:

git update-index --no-assume-unchanged [<file> ...]