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

How to revert one of multiple merges

From
Bill Lear <rael@zopyra.com>
Date
Oct 18, 2009, 02:31 UTC
Message-ID
<19162.32265.738503.382638@lisa.zopyra.com>
Branch A, B, C each have 20 commits, 0-19.
Branch v1.0.0 created, then merge of A, B, C performed.

After testing, we realize that the branch B is not ready for production release and we'd like to remove it from branch v1.0.0.

If I do
% git merge A B C
I get a single commit:
% git log -p
commit 1644a0b98c01869aa83e59aa41374c22098c47b6
[...]
Date:   Fri Oct 16 09:52:32 2009 -0500
    Merge branches 'A', 'B' and 'C' into v1.0.0
[20 x 3 commits]
If I do

% git merge A % git merge B % git merge C

Then:
% git log -p
commit 8946edd381384d0882221c87b5b3b7bf47127d70
[...]
Date:   Sat Oct 17 21:28:36 2009 -0500
    Merge branch 'B' into v1.0.0
commit 076ed422443e3684e564f7cae2b92e4538088ae6
[...]
Date:   Sat Oct 17 21:28:35 2009 -0500
    Merge branch 'A' into v1.0.0
but no "Merge branch 'C' into v1.0.0".

And so, I'm faced with git rebase -i posing some unanswerable questions to our release manager. She cannot easily remove B from the merge after doint either merge A B C, or merge A, merge B, merge C.

Can anyone help?
Bill
Next: Michael J Gruber
Message 1 of 4 in “How to revert one of multiple merges”
  1. Bill LearOct 18, 2009
  2. Michael J GruberOct 19, 2009
  3. Bill LearOct 19, 2009
  4. Michael J GruberOct 19, 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.