Joshua Phillips <> writes:

> I've found a case where git pull --rebase discards commits in my branch
> if the remote-tracking branch was rewound (and the remote tracking
> branch's reflog contains my branch's latest commit). This is due to
> git-pull's usage of git merge-base --fork-point.
> On one hand, this behaviour might be correct since the remote repository
> essentially removed that commit from master by 'reset --hard'. On the
> other hand, I was surprised that git pull --rebase discarded a commit in
> my branch.

Yup, that sounds like a bad way to handle the situation.  After all,
the upstream may have first accepted your first attempt, and then
decided that it was premature and rewound it, expecting you to give
an improved reroll.  But I also agree with you that it may be
correct to drop it because the upstream already rejected it.

Since Git cannot tell between these two cases, we should play safer
than what the current code does, I would think.

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to