git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nazri Ramliy <ayiehere@gmail.com>
To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Cc: Thomas Anderson <zelnaga@gmail.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: moving a remote branch?
Date: Thu, 17 Jun 2010 20:13:08 +0800	[thread overview]
Message-ID: <AANLkTikeLpvGA-RFBdMGblOnhNKJ6dUrpUZQlENMP51A@mail.gmail.com> (raw)
In-Reply-To: <A612847CFE53224C91B23E3A5B48BAC74483CEEA82@xmail3.se.axis.com>

On Thu, Jun 17, 2010 at 4:28 PM, Peter Kjellerstedt > Renaming a
remote branch is a two step operation. First you push the
> old branch into its new name, and then you remove the old branch. It
> can be done with these commands:
>
>        git push origin origin/featurea:refs/heads/featureb
>        git push origin :featurea

I'd like to add (more confusion!:) with this clarification:

The two push operation above rename the branch on the remote side.
It does not affect any of your local branches.

If you do "git branch -a" then you'd still see the
"origin/zelnaga/featurea" branch.

Doing a "git fetch origin" will get the newly renamed branch from the
remote repo and create a local version of it on your local repo.

At this point you can do "git branch -D origin/featurea".

nazri

  reply	other threads:[~2010-06-17 12:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-17  4:35 moving a remote branch? Thomas Anderson
2010-06-17  6:19 ` Nazri Ramliy
2010-06-17  8:28   ` Peter Kjellerstedt
2010-06-17 12:13     ` Nazri Ramliy [this message]
2010-06-17 13:02       ` Peter Kjellerstedt
2010-06-17 13:19         ` Nazri Ramliy
2010-06-17 13:55     ` Thomas Anderson
2010-06-17 15:05       ` Peter Kjellerstedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikeLpvGA-RFBdMGblOnhNKJ6dUrpUZQlENMP51A@mail.gmail.com \
    --to=ayiehere@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peter.kjellerstedt@axis.com \
    --cc=zelnaga@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).