unstage in git code example
Example 1: how to unstage a commit
git reset HEAD~
Example 2: git unstage file\
# unstage file before commit
git rm --cached <file_name>
Example 3: git unstage a file
$ git reset -- README
git reset HEAD~
# unstage file before commit
git rm --cached <file_name>
$ git reset -- README