From: David Reitter <david.reitter@gmail.com>
To: git@vger.kernel.org
Subject: merging two equivalent branches
Date: Thu, 7 Jan 2010 13:17:35 -0500 [thread overview]
Message-ID: <B0543B3C-C139-4BD3-B028-58B4DA132422@gmail.com> (raw)
Hello,
I have a problem with my git project, resulting from an upstream branch beyond my control being rewritten.
Can I specify parents for a revision whose history is hidden from git-log?
Concretely, I need to merge two branches that represent different conversions of the same original CVS branch (with >100k revisions).
I've been working with converted branch B, but now we have a new branch A. Revisions A150 and B145 correspond to the same tree, but there is no common ancestor:
A1 -> A2 -> A3 -> .. -> A150 (A)
B1 -> B2 -> B3 -> .. -> B145 (B)
I have a published downstream branch C with my own changes that started somewhere from B and has occasionally merged new developments from B. I'd now like to switch it to A. Future development will show up on A and I'd like to be able to merge it into C when that happens.
Using "git-merge -s ours" does this job nicely so that I can pull further development from the remote branch into mine.
However, git-log follows both parents of the new merge commit and thus shows many redundant commits. This is OK from the logical perspective, but because I have used the "ours" merge strategy, we're guaranteed to have only one revisions in the final tree. Thus, I wouldn't want to see all these revisions in the resulting branch. Grafts/rewrites or git-replace would probably lead to the same issue, I reckon.
Thanks for your help.
next reply other threads:[~2010-01-07 18:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-07 18:17 David Reitter [this message]
2010-01-07 18:22 ` merging two equivalent branches Christian MICHON
2010-01-07 21:16 ` git-log - hide parent (was: merging two equivalent branches) David Reitter
2010-01-08 5:00 ` Christian Couder
2010-01-12 16:59 ` David Reitter
2010-01-08 19:50 ` Avery Pennarun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B0543B3C-C139-4BD3-B028-58B4DA132422@gmail.com \
--to=david.reitter@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).