Pull --rebase looses merge information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]