undo last add ccommand code example
Example 1: revert git add
git reset <file> or git reset
Example 2: git unstage file for commit
git reset myfilename.txt
Example 3: undo add stage git
git reset <file>
git reset <file> or git reset
git reset myfilename.txt
git reset <file>