threads / discuss / 22828

How to move a big branches to a new base?

Subject: How to move a big branches to a new base?

## tl;dr

4 messages between Feb 26, 2010 and Mar 4, 2010.

replies: 3people: 2as markdown or json

Lin Mac· Feb 26, 2010, 03:18 UTC · lore
Hi,

I have a branch that have about 10 descendent branches. Now I would like to move this branch, and all the descendent branches, to a new base, and I might need to do so quiet frequently before I merge it to master branch.

My "dirty" way is to rebase step by step, it takes about 15-20 rebases, but the branches is somehow complicated, and this seems error-prone to me.

Is there a more clean way to do so?
Thanks in advance.

Best Regards, Mac Lin

Lin Mac· Mar 3, 2010, 03:17 UTC · re: Lin Mac · lore

Re: How to move a big branches to a new base?

Hi,

Sorry for re-send this again, for this is really important to me and trouble me a lot. And I've been searching for a long time, but I didn't found any useful.

Or maybe it's the way I uses branch wrong? Should I always keep a branch as clean as possible, and use tag for some unused/not often used branch, to avoid such problem?

Also I doubt whether my last mail reach the mailing list or not. So, any response welcome, even RTFM (I'm actually reading it....) is fine, at least let me know it's just a stupid question.....

Best Regards, Mac Lin

2010/2/26 Lin Mac <mkl0301@gmail.com>:
Show 18 quoted lines
> Hi,
>
> I have a branch that have about 10 descendent branches. Now I would
> like to move this branch, and all the descendent branches, to a new
> base, and I might need to do so quiet frequently before I merge it to
> master branch.
>
> My "dirty" way is to rebase step by step, it takes about 15-20
> rebases, but the branches is somehow complicated, and this seems
> error-prone to me.
>
> Is there a more clean way to do so?
>
> Thanks in advance.
>
> Best Regards,
> Mac Lin
>
John Tapsell· Mar 3, 2010, 03:54 UTC · re: Lin Mac · lore

Re: How to move a big branches to a new base?

On 26 February 2010 03:18, Lin Mac <mkl0301@gmail.com> wrote:
Show 6 quoted lines
> Hi,
>
> I have a branch that have about 10 descendent branches. Now I would
> like to move this branch, and all the descendent branches, to a new
> base, and I might need to do so quiet frequently before I merge it to
> master branch.

I tend to keep my branches as small as possible - a few commits at most. And avoid merges like the plague. This seems to work pretty well. Remember you can squash your commits together to keep the branches clean and well-ordered.

John
Lin Mac· Mar 4, 2010, 09:34 UTC · re: John Tapsell · lore

Re: How to move a big branches to a new base?

2010/3/3 John Tapsell <johnflux@gmail.com>:
Show 5 quoted lines
> I tend to keep my branches as small as possible - a few commits at
> most.  And avoid merges like the plague.  This seems to work pretty
> well.
> Remember you can squash your commits together to keep the branches
> clean and well-ordered.
squash is a powerful tools, but doens't help much in this situation.

In other word, one have to prevent a branch to becoming a tree. Does it worth to have a new tool for such situation?

Best Regard, Mac Lin

← back to recent threads