haymansfield haymansfield - 5 days ago 5
Git Question

Git: Ignore tracked files

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?

Answer

Sure.

git update-index --assume-unchanged file

To undo and start tracking again:

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