how to do unstage a file in git code example Example 1: git unstage file for commit git reset myfilename.txt Example 2: git unstage a file $ git reset -- README