Best practice for merging
- From
Mathieu Malaterre <mathieu.malaterre@gmail.com>
- Date
- Jan 17, 2011, 16:16 UTC
- Message-ID
- <AANLkTi=zpM3q1FXMVhavcUhjRWsg4wfLyFH88P7WMhc-@mail.gmail.com>
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 30401Should 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