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 23:24:50 -0400 [thread overview]
Message-ID: <32541b131003302024n42994e3nddab7544c24f93bd@mail.gmail.com> (raw)
In-Reply-To: <5D7B2F13-760B-4EBE-93A4-06B9CDDC3976@sb.org>
On Tue, Mar 30, 2010 at 10:24 PM, Kevin Ballard <kevin@sb.org> wrote:
> On Mar 30, 2010, at 6:19 PM, Avery Pennarun wrote:
>> git push origin localbranchname:remotebranchname
>
> Yes that works, but it's annoying to type out every time, especially when my
> branch has a long name and I don't want to risk typos. Even worse, the
> tab-completion in bash uses `git ls-remote` to complete the remote part of
> refspecs, so it's even slower to type "foo:kba<tab>" than it is to type
> "foo:kballard/foo".
You might consider creating a separate 'remote' entry then in your
.git/config. You should be able to reconfigure the refspec on that
one to use a particular branch name instead of a wildcard. It's not
exactly pretty, but laziness will be laziness.
A similar option would be to just make a shell alias and be done with it:
savebranch()
{
git push origin $1:kballard-$1
}
Have fun,
Avery
prev parent reply other threads:[~2010-03-31 3:25 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
[not found] ` <5D7B2F13-760B-4EBE-93A4-06B9CDDC3976@sb.org>
2010-03-31 3:24 ` Avery Pennarun [this message]
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=32541b131003302024n42994e3nddab7544c24f93bd@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).