-
-
Save latentflip/884843 to your computer and use it in GitHub Desktop.
I decide to work on a new feature, so I create a branch, topic. | |
o---o master | |
\ | |
o---o---o---o topic | |
I am not yet finished working on my feature when I have to make some bugfixes to master | |
o---o---o---o master | |
\ | |
o---o---o---o topic | |
To help me continue working on topic, I would like the bugfixes to be included in the topic branch. | |
Do I? | |
Merge master into topic (or) Rebase topic onto master | |
o---o-----------o---o master o---o---o---o master | |
\ \ \ | |
o---o---o---o---o topic o---o---o---o---o topic | |
What do you think? | |
I remember reading about the possible dangers of rebase, but can't quite remember what exactly those were =)
I think you shouldn't rebase if you push that branch to other repos
It's mentioned a little bit here for example:
"Perhaps the worst problem with traditional rebasing is that it prevents collaboration. Somebody who pulls from a repository before and after a rebasing will experience conflicts because the two histories contradict each other. Thus the standard caveat "don't rebase within a published repository", which can be reworded to "don't collaborate on work that you might later want to rebase"."
http://softwareswirl.blogspot.com/2009/04/truce-in-merge-vs-rebase-war.html
yeah, basically, if you've pushed that branch and others may have pulled it, don't rebase, otherwise (usually locally), you're fine
rebase, every time!