git rollback code to a commit

回退命令:
$ git reset --hard HEAD^ go back to the previous version
$ git reset --hard HEAD~3 go back to the first 3 commits, and so on, back to n commits
$ git reset --hard commit_id go back/go to the sha code of the specified commit

强推到远程:
$ git push origin HEAD --force
 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325139883&siteId=291194637