git unstage a file

C++
git reset myfilename.txt# unstage file before commit
git rm --cached <file_name>git reset HEAD~$ git reset -- READMEgit rm --cached <filePath>
Source

Also in C++: