From: Avery Pennarun Date: Wed, 31 Mar 2010 01:19:41 GMT Subject: Re: git push refspec to specify tracking branch Message-ID: <32541b131003301819x2cab23ffu84b65a0b4c553229@mail.gmail.com> In-Reply-To: <13A69FD9-234A-4E2A-B83F-096DE304FA16@sb.org> On Tue, Mar 30, 2010 at 9:06 PM, Kevin Ballard 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