unstage particular file git

C++
# unstage file before commit
git rm --cached <file_name>git reset HEAD <file>
Source

Also in C++: