how to remove git files that are staged for commit code example
Example 1: unstage staged files git
git reset HEAD file_path
Example 2: git remove staged area
$ git reset HEAD file
# Or everything
$ git reset HEAD .
git reset HEAD file_path
$ git reset HEAD file
# Or everything
$ git reset HEAD .