首页 > 其他 > 详细

git回滚到任意版本

时间:2019-07-12 21:19:47      阅读:82      评论:0      收藏:0      [点我收藏+]
先显示提交的log
$ git log -3
commit 4dc08bb8996a6ee02f
Author: Mark <xxx@xx.com>
Date:   Wed Sep 7 08:08:53 2016 +0800

    xxxxx

commit 9cac9ba76574da2167
Author: xxx<xx@qq.com>
Date:   Tue Sep 6 22:18:59 2016 +0800

    improved the requst

commit e377f60e28c8b84158
Author: xxx<xxx@qq.com>
Date:   Tue Sep 6 14:42:44 2016 +0800

    changed the password from empty to max123
回滚到指定的版本
git reset --hard e377f60e28c8b84158
强制提交

git push -f origin master

更多参考

git回滚到任意版本

原文:https://www.cnblogs.com/ZY-Dream/p/11178042.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!