GitCommit ManagementCommit Management Modify the latest commit git commit --amend Create a new commit that undoes changes from a previous commit git revert <commit_id> Discard changes and move HEAD to a specific commit git reset --hard <commit_id> Move HEAD to a specific commit, but preserve staged changes git reset --soft <commit_id> Show a record of all changes made to the local repository head git reflogPreviousCommit HistoryNextCheatsOn this page