[sr-dev] release branches

Jan Janak jan at ryngle.com
Thu Oct 29 14:13:39 CET 2009


Henning,

On Thu, Oct 29, 2009 at 2:00 PM, Henning Westerholt
<henning.westerholt at 1und1.de> wrote:
> 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 at 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 at 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 at ca:~/sip-router$ git log
>
> Shows the correct changes
>
> henning at 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 at 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..

You need to specify the name of the branch in the remote repository
you want to push to if the name of the local branch and the name of
the remote branch do not match:

  $ git push origin marius-tmp:sr_3.0

The manpage on git-push describes what happens if you omit the name of
the destination branch:

  The <dst> tells which ref on the remote side is updated with this
  push. Arbitrary expressions cannot be used here, an actual ref must
  be named. If :<dst> is omitted, the same ref as <src> will be
  updated.

  -- Jan



More information about the sr-dev mailing list