* git push refspec to specify tracking branch
@ 2010-03-31 1:06 Kevin Ballard
2010-03-31 1:19 ` Avery Pennarun
0 siblings, 1 reply; 3+ messages in thread
From: Kevin Ballard @ 2010-03-31 1:06 UTC (permalink / raw)
To: git
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.
-Kevin Ballard
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git push refspec to specify tracking branch
2010-03-31 1:06 git push refspec to specify tracking branch Kevin Ballard
@ 2010-03-31 1:19 ` Avery Pennarun
[not found] ` <5D7B2F13-760B-4EBE-93A4-06B9CDDC3976@sb.org>
0 siblings, 1 reply; 3+ messages in thread
From: Avery Pennarun @ 2010-03-31 1:19 UTC (permalink / raw)
To: Kevin Ballard; +Cc: git
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-03-31 3:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-31 1:06 git push refspec to specify tracking branch Kevin Ballard
2010-03-31 1:19 ` Avery Pennarun
[not found] ` <5D7B2F13-760B-4EBE-93A4-06B9CDDC3976@sb.org>
2010-03-31 3:24 ` Avery Pennarun
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).