← Home

Git

Undo & recover

CommandUse
git reset --soft HEAD~1Undo the last commit, keep changes
git reflogRecover with reflog

Inspection

CommandUse
git log --oneline --graph --decorate --allInspect history as a graph