git unstage committed files code example
Example 1: git unstage file for commit
git reset myfilename.txt
Example 2: how to unstage a commit
git reset HEAD~
Example 3: git unstage a file
$ git reset -- README
git reset myfilename.txt
git reset HEAD~
$ git reset -- README