git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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   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
Message 1 of 1 in “Best practice for merging”
  1. Mathieu MalaterreJan 17, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.