how to undo my work before commit code example
Example 1: git undo add
// undo add for one file
git reset <file>
// undo add for all files
git reset
Example 2: undo git
# KEEP CHANGES
git reset --soft HEAD~1
# REMOVE CHANGES
git reset --hard HEAD~1