Go back to the last commit and clean up the local committed code
git reset --hard HEAD^
Roll back to the last commit and return the code of the local commit
git reset --soft HEAD~1
Go back to the last commit and clean up the local committed code
git reset --hard HEAD^
Roll back to the last commit and return the code of the local commit
git reset --soft HEAD~1