git cheat sheet - Forest0923/memo GitHub Wiki

Cancel git add

git reset
# or
git reset <file>

Cancel git commit

# Reset contents 
git reset <tag> --hard

# Reset commit and keep changes
git reset <tag> --soft

View previous commit

git checkout <tag>
⚠️ **GitHub.com Fallback** ⚠️