git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathieu Malaterre <mathieu.malaterre@gmail.com>
To: git@vger.kernel.org
Subject: Best practice for merging
Date: Mon, 17 Jan 2011 17:16:52 +0100	[thread overview]
Message-ID: <AANLkTi=zpM3q1FXMVhavcUhjRWsg4wfLyFH88P7WMhc-@mail.gmail.com> (raw)

Hi all,

  Sorry if this sound like a noob question, but this is something that
I am still not quite happy with (and google was not of any help). What
is the best way to handle merging in between a development branch and
a release branch.
  Here is the state of my current branches:

$ git diff -w release..master | wc
 156468  688491 5327390
$ git cherry release | wc
    707    1414   30401

Should I go over all those 707 individual commit, and cherry-pick them
one-by-one ?

I know for example that I do not want to merge anything related to a
new app, eg 'app2.cxx', how would one do something like :

git merge master --not applications/app2.cxx ?

Same question, I know I want to apply any change that happen within a
subdirectory but not another (this might be a problem if a commit
contains both). Let's say I want everything but what ever happen in
directory libB, can I do:

git checkout release
git merge master
git rm -rf libs/libB

finally, If I try to apply any change directly

git checkout release
git checkout master applications/app1.cxx

This will loose the whole git history, is this a bad practice ?

Thanks a lot !
-- 
Mathieu

                 reply	other threads:[~2011-01-17 16:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='AANLkTi=zpM3q1FXMVhavcUhjRWsg4wfLyFH88P7WMhc-@mail.gmail.com' \
    --to=mathieu.malaterre@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).