Op 13-9-2011 23:10, Julien Rioux schreef:
How can git help me porting patches to the stable branch?
Previously with svn I just had two directories, one pointing to trunk
one to branch. I made a patch file from trunk by svn diff -r then
applied the patch to branch, manually copying the log message. Does
git make it any easier?
In svn you can already do it easier with 'svn merge' (IIRC):
.\branch-20x> svn merge -c 28393 ..\trunk
In git you can something like this with 'git cherry-pick':
on branch-20x do:
git cherry-pick <sha1-of-a-commit>
The nicest way though is to make your new feature in a new topic branch
on the top of branch-20x if it is a candidate to be backported. Then,
when you're ready and happy with it, you merge this topic branch into
branch-20x. Afterwards you regularly merge the branch-20x into trunk. In
this way, you have only 1 commit that is now present in both branch as
trunk. One example: it is then much easier to determine in which
branches a certain commit is and in which it is not.
Vincent