码迷,mamicode.com
首页 > 其他好文 > 详细

git 合并master到本分支 合了一半发现有冲突,撤回合并

时间:2019-05-16 20:25:20      阅读:807      评论:0      收藏:0      [点我收藏+]

标签:回滚   res   git push   找到你   log   word   并且   origin   版本   

1.git 合并master到本分支发现有冲突,并且不想解决冲突,撤回合并

git reset --hard

 

2.已经合并到master的代码

git log  找到你的提交commit

git reset --hard e377f60e28c8b84158  撤回到你找到的提交id

 

 

应用场景是,如果你的代码提交了,你要想回滚到上几个版本

3.git checkou 要回到提交的ID

   git checkout -b 新分支

   git push --set-stream origin 新分支

git 合并master到本分支 合了一半发现有冲突,撤回合并

标签:回滚   res   git push   找到你   log   word   并且   origin   版本   

原文地址:https://www.cnblogs.com/caohuimingfa/p/10877730.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!