Add all files to a commit except a single file?

git add -u
git reset -- main/dontcheckmein.txt

Note: Git has subsequently added special syntax for this, which is explained in other answers.

Leave a Comment