johnlayt at googlemail.com
Fri Mar 18 01:24:03 GMT 2011
On Thursday 17 Mar 2011 22:40:32 Christoph Feck wrote:
> Do you need it in 4.6.2? I can apply to trunk, but I won't touch branches
> until my git foo matures :)
Not too much git-foo required to back or forward port as we can't really merge
in kdelibs yet, so we just cherry-pick the commit we need:
git branch --track KDE/4.6 origin/KDE/4.6
git checkout KDE/4.6
git cherry-pick -x -e <commit-to-pick>
git push origin KDE/4.6:KDE/4.6
In the branch step you're just telling git to create a new local branch that
'tracks' the remote branch instead of your local master.
In the cherry pick -x adds the original commit sha to the commit message for
tracking purposes, and -e allows you to edit the commit message if needed.
Of course, the cherry pick applies equally as well to a forward port from 4.6
to master which is the more 'git' style of doing things.
The awkward part is that once master and 4.6 diverge too much the rebuild will
take a while, so you need some script-foo to have separate build and inst
paths for stable and master. It's annoying to have to remember to do the path
switch, hopefully someone will create some script-foo for automatically
switching the paths when switching branches. I just use a separate clone and
env script so I can code and build in both stable and master simultaneously.
P.S. I've already documented this at
http://techbase.kde.org/Development/Git#Git_Recipes, feel free to add more :-)
More information about the kde-core-devel