git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Pull --rebase looses merge information
@ 2011-10-06 19:21 Duane Murphy
  2011-10-06 20:31 ` in-gitvger
  0 siblings, 1 reply; 3+ messages in thread
From: Duane Murphy @ 2011-10-06 19:21 UTC (permalink / raw)
  To: git

Here is the synopsis:

$ git checkout master
$ git pull
... time passes ... 
$ git checkout topic # remote topic
$ git checkout master
$ git merge topic
$ git push
    non-fast-forward updates were rejected
$ git pull 
    merge by rebase; implied by config
$ git push

The result of this process is that the file changes are pushed but the reference back to the topic branch has been lost. This makes it appear as though the topic branch has not been merged properly.

The trigger appears to be the pull (with rebase) that occurs after the merge and before the push. This of course is caused by the repo being out of sync from the point when the merge was started. That window of time can be shortened but it can never be zero.

The problem is fixed by merging again, but it's difficult to notice that this problem has actually occurred.

It has been noted that the problem is that we are using rebase on pull. We set our configurations to always rebase on a pull from a remote branch. This makes sense as it prevents artificial merges and unusual modifications to the history with respect to the shared repository. That is, if I'm working on merging changes into a remote branch and some one beats me, my merge should be after his, not before.

I would hope that a rebase operates mostly like a merge (understanding that rebase is different). I would not expect the merge information (ie the source branch of the merge) to be lost just because of a rebase.

Is there a bug here? Is there some way to avoid this situation without sacrificing the benefits of pull --rebase?

Thanks,

 ...Duane

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-07  6:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-06 19:21 Pull --rebase looses merge information Duane Murphy
2011-10-06 20:31 ` in-gitvger
2011-10-07  6:46   ` Philippe Vaucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).