git/list[1] front-page[2] threads[3] people[4] search[5] about
 

cherry-pick/rebase question

From
Jay Soffian <jaysoffian@gmail.com>
Date
Jan 21, 2009, 17:27 UTC
Message-ID
<76718490901210927m7fd3fbdey6ebd4cbfe44b1b71@mail.gmail.com>
Say I have the following linear set of commits on master:
A---B---C---D---E---F---G master

And I realize that I've intermixed two topics such that I want to move commits B and E-G to their own branch. So my result should be:

A---C'---D' master
 \
  B'---E'---F'---G' topic
What's the best way to do it?

I read the rebase and cherry-pick man pages, found myself confused, tried rebase a few different ways, failed, and ended up doing what I needed with format-patch and am. (Extract B-G with format-patch, reset master to A, create topic branch, apply B,E,F,G to topic with am, similarly apply C,D to master with am.)

Thanks,
j.
Next: Jay Soffian
Message 1 of 2 in “cherry-pick/rebase question”
  1. Jay SoffianJan 21, 2009
  2. Jay SoffianJan 21, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.