revert git add code example
Example 1: git undo add
// undo add for one file
git reset <file>
// undo add for all files
git reset
Example 2: revert git add
git reset <file> or git reset
Example 3: how to revert to log in git
git revert --no-commit 0766c053..HEAD
git commit