git unstage file but keep changes code example Example: git unstage file for commit git reset myfilename.txt