Alper

Git Undo last commit

Undo local commit

git reset --head HEAD~1

moves HEAD back, clears the staging area, and wipes out the changes in your working directory

git reset --soft HEAD~1

moves HEAD back to one commit but leaves your changes in the staging area

Revert

git revert HEAD
git revert <commit-hash>

Undo pushed commit rewrite history

git push --force

#git