On Fri, Sep 18, 2009 at 11:27 AM, Nico Weber <[email protected]> wrote:
> 2.) I often have 3-5 feature branches. When one of them is of them is > getting ready to submit, I usually rebase it on ToT before sending it > to the try servers. I do this thusly: > > git checkout trunk > git pull > git checkout myfeaturebranch > git rebase trunk > > (this can probably be done in an easier way, but it works and is > easily put into a bash alias, so I looked only briefly for a better > way, and didn't find anything). Now, when I want to work on the other > branches, I always rebase them to trunk when I switch to them, i.e. I > run > > git checkout otherbranch > git rebase trunk > > If I didn't use that branch for a week or so, the first step takes > quite some time to remove all the changes that I pulled in since last > using my branch, while the second step takes about the same time to > undo all the work that the first step did, which seems stupid. Is > there a command for "go to that branch, but rebase it immediately"? > I do this: git fetch origin git rebase origin/trunk <branch I want to rebase> ... the above will download the latest from the central repo and then will rebase your branch onto origin/trunk. This works especially well if you create your branch tracking origin/trunk: git branch mybranch origin/trunk rsesek / @chromium.org --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: [email protected] View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---
