how to remove a file staged for commit git code example
Example 1: how to remove all files from staging area git
git rm --cached -r .
Example 2: unstage staged files git
git reset HEAD file_path
git rm --cached -r .
git reset HEAD file_path