- undo the commits from the local repository (it means you haven't
git push
them)
1.1 If you only want to add more changes to the previous commit, or change the commit message
git reset --soft HEAD~
1.2 If you also want to un-add the files which you added using git add
command
git reset HEAD~