Git rolls back the latest local submission (there are two methods that do not clear local submissions and clear local submissions)

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

Guess you like

Origin blog.csdn.net/u010351988/article/details/122337860