Git development
 help / color / mirror / Atom feed
* git rebase to move a batch of patches onto the current branch
@ 2008-07-24 19:57 Avery Pennarun
  2008-07-24 20:13 ` Alex Riesen
  2008-07-25 20:31 ` Björn Steinbrink
  0 siblings, 2 replies; 9+ messages in thread
From: Avery Pennarun @ 2008-07-24 19:57 UTC (permalink / raw)
  To: Git Mailing List

Hi,

I often find myself being on a branch and wanting to do the equivalent
of a series of cherry-picks from another branch into the current one.
Unfortunately, "git cherry-pick" only does one patch at a time (which
is very tedious), and "git rebase", which is much less tedious to use,
seems to specializing in applying your current branch on top of
another branch, not the other way around.

Currently I do something like this:

      git checkout -b tmp branch_with_interesting_stuff~5
      git rebase --onto mybranch branch_with_interesting_stuff~15
      git branch -d mybranch
      git branch -m tmp mybranch

But it seems a little complex when what I *really* want to type is
something like:

      git cherry-pick
branch_with_interesting_stuff~15..branch_with_interesting_stuff~5

and have it give me a rebase-style UI in case of conflicts, etc.  And
of course, even more bonus points if I can get "rebase -i"
functionality.

Am I missing an obvious syntax option here or is this not something
normal people want to do?

I see that the second option to rebase sounds almost right:

       If <branch> is specified, git-rebase will perform an automatic git
       checkout <branch> before doing anything else. Otherwise it remains
       on the current branch.

So I could perhaps do this:

       git rebase --onto mybranch branch_with_interesting_stuff~15 \
              branch_with_interesting_stuff

But it sounds like that would rewrite branch_with_interesting_stuff
instead of mybranch.

Thanks,

Avery

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-07-25 20:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-24 19:57 git rebase to move a batch of patches onto the current branch Avery Pennarun
2008-07-24 20:13 ` Alex Riesen
2008-07-24 20:16   ` Avery Pennarun
2008-07-24 20:30     ` Alex Riesen
2008-07-24 20:42       ` Avery Pennarun
2008-07-25 19:16         ` Daniel Barkalow
2008-07-25 19:25           ` Stephan Beyer
2008-07-25 20:00             ` Alex Riesen
2008-07-25 20:31 ` Björn Steinbrink

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox