git pull --rebase
removes unpushed merge commits. Is there a way to make it preserve them?
Say my history looks like—
A
|
B H
| |
C G
| |
D F
| /
E
(A
being the merge commit.)
After a git pull --rebase
it becomes—
H
|
G
|
F
|
X
|
B
|
C
|
D
|
E
(X
being the new commits git pull --rebase
inserted into my history.)—A
is removed.
I know you can use git rebase --preserve-merges
to preserve them with git rebase
, but I don't see a way to preserve them with git pull --rebase
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…