unstage a file with git code example
Example 1: git unstage file for commit
git reset myfilename.txt
Example 2: Why are there two ways to unstage a file in Git?
git rm --cached <filePath>
git reset myfilename.txt
git rm --cached <filePath>