记一次当前分支git pull的冲突

在master使用git pull的时候发生冲突,很懵逼,log对比下提交记录git

本地fetch

commit1(个人,0308号提交)it

commit2ast

commit3co

远程远程

commit23123(???)push

commit12321ab

...commit

commit4(0314号的)分支

commit3

 

也就是说个人commit1和commit2凭空消失了

经查是有人作了reset,抛弃commit2,而我想保留commit1,所以操做一波

步骤:

从master切一个分支,fixConflict

强制覆盖本地master

git fetch --all

git reset --hard origin/master

git pull

在master上cherry-pick 个人

git cherry-pick 108389a26d12c9733ac4411ac8f3902babfa002a
git push

 

搞定

git log检查

commit1

commit23123

commit12321

相关文章
相关标签/搜索