unstage a file 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: unstage particular file git
git reset HEAD <file>
Example 4: git unstage a file
$ git reset -- README