[Git] Revert to a old commit

You can do 

git log

first to check which commit message you want to revert to.

 

For example 'xxxxx123' is the commit id we want to revert to.

 

Then do:

git revert --no-commit xxxxx123..HEAD
git commit

 

posted @ 2020-12-08 15:19  Zhentiw  阅读(219)  评论(0编辑  收藏  举报