git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avery Pennarun <apenwarr@gmail.com>
To: Kevin Ballard <kevin@sb.org>
Cc: git@vger.kernel.org
Subject: Re: git push refspec to specify tracking branch
Date: Tue, 30 Mar 2010 21:19:41 -0400	[thread overview]
Message-ID: <32541b131003301819x2cab23ffu84b65a0b4c553229@mail.gmail.com> (raw)
In-Reply-To: <13A69FD9-234A-4E2A-B83F-096DE304FA16@sb.org>

On Tue, Mar 30, 2010 at 9:06 PM, Kevin Ballard <kevin@sb.org> wrote:
> Is there any way in a refspec to specify the tracking branch
> corresponding to a local branch? Specifically, I want to be able to
> write some variant of `git push origin +foo` and have it push foo to
> its tracking branch. I can't find any way to do that according to
> the current documentation.

This is probably a stupid suggestion, but since you're only likely to
have a single local branch corresponding to a particular remote
branch, the easiest answer is to rename your local branch to have the
same name :)

Otherwise, what you probably want is:

   git push origin localbranchname:remotebranchname

You can also delete a remote branch:

   git push origin :remotebranchname

Have fun,

Avery

  reply	other threads:[~2010-03-31  1:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-31  1:06 git push refspec to specify tracking branch Kevin Ballard
2010-03-31  1:19 ` Avery Pennarun [this message]
     [not found]   ` <5D7B2F13-760B-4EBE-93A4-06B9CDDC3976@sb.org>
2010-03-31  3:24     ` Avery Pennarun

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=32541b131003301819x2cab23ffu84b65a0b4c553229@mail.gmail.com \
    --to=apenwarr@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kevin@sb.org \
    /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).