{"thread":{"id":"26293","subject":"Best practice for merging","startedAt":"2011-01-17T16:16:52Z","lastAt":"2011-01-17T16:16:52Z","messageCount":1,"participants":["Mathieu Malaterre"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"159556","messageId":"AANLkTi=zpM3q1FXMVhavcUhjRWsg4wfLyFH88P7WMhc-@mail.gmail.com","threadId":"26293","inReplyTo":null,"subject":"Best practice for merging","fromName":"Mathieu Malaterre","fromEmail":"mathieu.malaterre@gmail.com","sentAt":"2011-01-17T16:16:52Z","receivedAt":"2011-01-17T16:16:52Z","isPatch":false,"sender":{"key":"mathieu.malaterre@gmail.com","avatar":"https://gravatar.com/avatar/0728db14da3b5f9cb00476f504394196a14dac116214d8114f402fad0871bb86?d=mp&s=160"},"body":"Hi all,\n\n  Sorry if this sound like a noob question, but this is something that\nI am still not quite happy with (and google was not of any help). What\nis the best way to handle merging in between a development branch and\na release branch.\n  Here is the state of my current branches:\n\n$ git diff -w release..master | wc\n 156468  688491 5327390\n$ git cherry release | wc\n    707    1414   30401\n\nShould I go over all those 707 individual commit, and cherry-pick them\none-by-one ?\n\nI know for example that I do not want to merge anything related to a\nnew app, eg 'app2.cxx', how would one do something like :\n\ngit merge master --not applications/app2.cxx ?\n\nSame question, I know I want to apply any change that happen within a\nsubdirectory but not another (this might be a problem if a commit\ncontains both). Let's say I want everything but what ever happen in\ndirectory libB, can I do:\n\ngit checkout release\ngit merge master\ngit rm -rf libs/libB\n\nfinally, If I try to apply any change directly\n\ngit checkout release\ngit checkout master applications/app1.cxx\n\nThis will loose the whole git history, is this a bad practice ?\n\nThanks a lot !\n-- \nMathieu\n"}]}