how to unstage changes from commit code example Example: git unstage file for commit git reset myfilename.txt