To revert your last commit from the command line, use: revert-last-commit-keep-changes.shdelete-changes.shCopygit reset HEAD~1