GIT Commit Exluding One File

git update-index --assume-unchanged "main/dontcheckmein.txt"

/*and to undo that*/
git update-index --no-assume-unchanged "main/dontcheckmein.txt"