On Samstag, 10. Oktober 2009, Andrei Pelinescu-Onciul wrote:
> If by mistake a sr_3.0 relevant fix is committed first to another branch,
> git cherry-pick -x can (and should) be used to backport it.
> E.g.:
> git checkout sr_3.0
> git cherry-pick -x <fix_commit_id>
> git pull origin sr_3.0:sr_3.0
Hi Andrei,
i'Ve tried today to cherry-pick some changes from master to the sr_3.0 branch. Here is what i did:
henning@ca:~/sip-router$ git checkout --track -b marius-tmp origin/sr_3.0
Branch marius-tmp set up to track remote branch refs/remotes/origin/sr_3.0.
Switched to a new branch "marius-tmp"
henning@ca:~/sip-router$ git cherry-pick -x e06a69d625d4c1293fceef13f9eca22e14662f9f
Auto-merged modules/carrierroute/cr_func.c
Finished one cherry-pick.
Created commit 084ad8a: If the user parameter is "<null>" (e.g a empty username in the request URI), do not copy this value to the rewritten uri.
1 files changed, 21 insertions(+), 10 deletions(-)
[some more cherry picks..]
henning@ca:~/sip-router$ git log
Shows the correct changes
henning@ca:~/sip-router$ git status
# On branch marius-tmp
# Your branch is ahead of 'origin/sr_3.0' by 11 commits.
Also fine.
According to the tutorial i found i need now to push this, but i'm not sure if the command really does the right thing:
henning@ca:~/sip-router$ git push origin marius-tmp --dry-run
To ssh://henning@git.sip-router.org/sip-router
* [new branch] marius-tmp -> marius-tmp
It seems that it want to create a new remote branch, which is not really what i want..
Best regards,
Henning