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