remove everything from git add code example
Example 1: how to unadd gitr file
git reset HEAD myfile.txt
Example 2: undo add stage git
git reset <file>
Example 3: git file reset to head
git checkout HEAD -- my-file.txt
git reset HEAD myfile.txt
git reset <file>
git checkout HEAD -- my-file.txt