git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ripton <dripton@ripton.net>
To: Erez Zilber <erezzi.list@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: How to handle a git repository with multiple branches
Date: Thu, 26 Aug 2010 17:17:42 -0400	[thread overview]
Message-ID: <4C76D9F6.7070306@ripton.net> (raw)
In-Reply-To: <AANLkTimW-SQi1eprxTPXxF85SBO4d5MU13=dsboNNrzd@mail.gmail.com>

On 08/26/10 07:53, Erez Zilber wrote:

> Some commits are relevant only for branch_1, some are relevant only
> for branch_2 and some are relevant for both. For the commits that are
> relevant for both branches, I thought about the following solutions:
> 1. Put these common commits in branch_1 and merge branch_1 into
> branch_2. This is bad because it will also merge commits that are
> relevant only for branch_1.
> 2. Cherry-pick the common commits from branch_1 to branch_2. This is
> also bad because the commit ID changes, and in case of conflicts, git
> is unable to tell that these 2 commits are actually the same commit.
> This makes it very difficult to track the changes between branches.
>
> Since there are several other developers and sub-maintainers in this
> project which are rebased on both these branches, I don't want to
> change the git history of my branches because when I do that,
> sub-maintainers and developers lose the reference to their base.
>
> I'm looking for a better solution. Is there any best-practice solution?

Fix bugs in the oldest release branch to which the fix applies.  Then 
merge the old branches into the new ones.

When this doesn't work, then you have to cherry pick.

-- 
David Ripton    dripton@ripton.net

  parent reply	other threads:[~2010-08-26 21:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-26 11:53 How to handle a git repository with multiple branches Erez Zilber
2010-08-26 13:09 ` Joshua Juran
2010-08-26 21:17 ` David Ripton [this message]
2010-08-26 23:03 ` Jon Seymour
2010-08-31  7:21   ` Erez Zilber

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=4C76D9F6.7070306@ripton.net \
    --to=dripton@ripton.net \
    --cc=erezzi.list@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).