From: Sam Vilain <sam@vilain.net>
To: Samuel Tardieu <sam@rfc1149.net>
Cc: Pierre Habouzit <madcoder@debian.org>,
Andreas Ericsson <ae@op5.se>, Bill Lear <rael@zopyra.com>,
git@vger.kernel.org
Subject: Re: Using the --track option when creating a branch
Date: Thu, 30 Oct 2008 11:00:26 -0700 [thread overview]
Message-ID: <1225389626.19891.35.camel@maia.lan> (raw)
In-Reply-To: <2008-10-30-15-56-34+trackit+sam@rfc1149.net>
On Thu, 2008-10-30 at 15:56 +0100, Samuel Tardieu wrote:
> * Pierre Habouzit <madcoder@debian.org> [2008-10-30 15:41:07 +0100]
>
> | On Thu, Oct 30, 2008 at 02:23:16PM +0000, Samuel Tardieu wrote:
> | > I think it would be better to have :
> | >
> | > git push <= push the current branch
> | > git push --all <= push all matching refs
> | > git push --all --create <= push all matching refs, create if needed
> | >
> | > The latest command is probably used so rarely (compared to the others)
> | > that it wouldn't be a problem to make it longer. Of course, if a
> | > refspec is given explicitely, it should be honored and remote refs
> | > created if needed.
> |
> | Fwiw I'm in favor of that, and it was what I advocated at the time.
> |
> | Though I think than as soon as you add an explicit remote name, like:
> | git push origin, pushing all matched references makes sense. Which is
> | also what I advocated at the time.
>
> Indeed, it makes sense. We could then have:
>
> git push <= push the current branch on default remote
> (which is, at least in my case, the most
> frequent use I want to make of "git push",
> on all the projects [work or volunteer]
> I work on)
> git push remote <= push all matching refs on named remote
I think that 'git push origin' should be the same as 'git push'; so,
'git push remote' would then just push the current head to the tracking
branch of that remote. This exposes another issue with the current
method of configuring the tracking branch, which is that only one remote
and branch may be configured for each local branch. In reality, someone
might be pushing and pulling from multiple remotes; expecting them to
keep naming the current branch all the time seems arduous.
I think if you want matching refs to be pushed, say so:
git push remote --matching
> git push --all [remote] <= push and create all refs on remote (or default)
next prev parent reply other threads:[~2008-10-30 18:01 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 15:23 Using the --track option when creating a branch Bill Lear
2008-10-29 16:25 ` Santi Béjar
2008-10-29 20:33 ` Bill Lear
2008-10-30 5:12 ` Sam Vilain
2008-10-30 12:04 ` Bill Lear
2008-10-30 12:12 ` Bill Lear
2008-10-30 12:25 ` Andreas Ericsson
2008-10-30 13:52 ` Samuel Tardieu
2008-10-30 14:06 ` Andreas Ericsson
2008-10-30 14:23 ` Samuel Tardieu
2008-10-30 14:41 ` Pierre Habouzit
2008-10-30 14:56 ` Samuel Tardieu
2008-10-30 18:00 ` Sam Vilain [this message]
2008-10-30 14:54 ` Andreas Ericsson
2008-10-30 15:04 ` Samuel Tardieu
2008-10-30 15:25 ` Andreas Ericsson
2008-10-30 15:42 ` Bill Lear
2008-10-30 19:13 ` Marc Branchaud
2008-10-30 17:57 ` Sam Vilain
2008-10-30 23:24 ` Jakub Narebski
2008-11-02 4:23 ` Jeff King
2008-10-30 16:44 ` Sam Vilain
2008-10-30 12:41 ` Santi Béjar
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=1225389626.19891.35.camel@maia.lan \
--to=sam@vilain.net \
--cc=ae@op5.se \
--cc=git@vger.kernel.org \
--cc=madcoder@debian.org \
--cc=rael@zopyra.com \
--cc=sam@rfc1149.net \
/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).