Make git pull --rebase preserve merge commits

后端 未结 3 1480
一个人的身影
一个人的身影 2020-12-05 14:49

git pull --rebase removes unpushed merge commits. Is there a way to make it preserve them?

Say my history looks like—

A
| \\ 
B  H
|  |
         


        
3条回答
  •  伪装坚强ぢ
    2020-12-05 15:29

    you can split your pull in a fetch and a rebase

    git fetch origin master
    git rebase origin master --preserve-merges
    

提交回复
热议问题