From: skillzero@gmail.com
To: git@vger.kernel.org
Subject: Re: git merge and cherry-pick and duplicated commits?
Date: Wed, 14 Jan 2009 10:33:02 -0800 [thread overview]
Message-ID: <2729632a0901141033p47b4d8dah46f5bac27307d306@mail.gmail.com> (raw)
In-Reply-To: <496DA3B2.1070807@viscovery.net>
On Wed, Jan 14, 2009 at 12:34 AM, Johannes Sixt <j.sixt@viscovery.net> wrote:
> After you created the fixup, you have this situation:
>
> o--o--o <- A (feature branch)
> /
> --o--x <- X (the fix-up branch)
> \
> o--o--o <- Z (probably your master)
>
> You merge the fix-up into the feature branch and continue developing the
> feature:
>
> o--o--o--M--o--o <- A
> / /
> --o--x-----' <- X
> \
> o--o--o <- Z
>
> Other people need the fix in Z right now, so you merge it into Z as well:
>
> o--o--o--M--o--o <- A
> / /
> --o--x-----< <- X
> \ \
> o--o--o--N <- Z
>
> You complete your feature and merge it into Z:
>
> o--o--o--M--o--o <- A
> / / \
> --o--x-----< \ <- X
> \ \ \
> o--o--o--N---------O <- Z
>
> The fix-up commit is only once in your history.
Thanks for the info. That's what I was hoping, but I was thinking that
I'd get duplicate commits if I did that. I'll have to try it out when
I run into this situation again.
Related to this, is there a way to easily find the common merge base
given a bunch of a branches? When I want to fix a bug, I want to say
"Given branches A, B, C, D, and E, where should I fork my bug fix
branch from so that I can merge this branch into all those branches
without getting duplicate commits?".
next prev parent reply other threads:[~2009-01-14 18:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-14 2:40 git merge and cherry-pick and duplicated commits? skillzero
2009-01-14 5:31 ` Brian Gernhardt
2009-01-14 6:21 ` skillzero
2009-01-14 7:34 ` Johannes Sixt
2009-01-14 8:08 ` skillzero
2009-01-14 8:34 ` Johannes Sixt
2009-01-14 18:33 ` skillzero [this message]
2009-01-14 19:40 ` Peter Baumann
2009-01-14 20:16 ` Junio C Hamano
2009-01-15 23:09 ` Markus Heidelberg
2009-01-14 8:38 ` Boaz Harrosh
2009-01-14 8:41 ` Thomas Rast
2009-01-14 13:47 ` Alex Riesen
2009-01-14 7:33 ` skillzero
2009-01-14 15:53 ` Sitaram Chamarty
2009-01-14 8:31 ` Nanako Shiraishi
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=2729632a0901141033p47b4d8dah46f5bac27307d306@mail.gmail.com \
--to=skillzero@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).