Re: Rebasing Multiple branches at once...
- From
- Rick Moynihan <rick@calicojack.co.uk>
- Date
- Oct 16, 2008, 14:57 UTC
- Message-ID
- <48F75657.6010308@calicojack.co.uk>
- In-Reply-To
- <8663nsfxoq.fsf@lola.quinscape.zz>
David Kastrup wrote:
Show 19 quoted lines
> Rick Moynihan <rick@calicojack.co.uk> writes: > >> Hi, >> >> I have a master branch, a dev branch and a number of feature branches >> from dev. And I was wondering if there was an easy way to rebase dev >> and all of it's sub-branches onto master. >> >> I know I can run this as a series of commands, and use --onto to do >> this, but was wondering if there was an easier way. As running: >> >> git rebase master >> >> when on the dev branch only rebases dev and not it's dependent branches. > > Rebasing has no relation to dependent branches. It creates a new branch > from the branch point. After it finishes, it just reseats HEAD of the > branch to the new one. There is no operation that would work implicitly > on originally dependent branches.
This appears to be true of the current implementation, but shouldn't it be possible to do this as a single operation?
e.g. when the situation is this with dev being the current branch.
o---o---o---o---o master
\
o---o---o---o---o dev (*)
\
o---o---o topicRunning the hypothetical command:
git rebase master --all
Would produce this:
o---o---o---o---o master
\
o---o---o---o---o dev (*)
\
o---o---o topicI think this can be performed right now with a rebase followed by a rebase --onto
I can see how if there were conflicts in the rebase from dev, then you would need to resolve them all the way up your topic branches also. Is there anything else that makes this a bad idea?
R.