git add all except one file

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

where main/dontcheckmein.txt is the unwanted file.
Source

Also in C++: