git add all files except one code example
Example: git add all except one file
git add -u
git reset -- main/dontcheckmein.txt
where main/dontcheckmein.txt is the unwanted file.
git add -u
git reset -- main/dontcheckmein.txt
where main/dontcheckmein.txt is the unwanted file.