git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git push <branch-name>

From
SHSebastian Harl <tokkee@debian.org>
Date
Oct 6, 2010, 13:41 UTC
Message-ID
<20101006134135.GS26193@chough.tokkee.org>
In-Reply-To
<AANLkTi=sDDXRKuHf93cZ4fSVpZFvgyB+k934qg7gDL9T@mail.gmail.com>
Hi,
On Tue, Oct 05, 2010 at 03:28:56PM -0700, Eric Raible wrote:
Show 14 quoted lines
> On Tue, Oct 5, 2010 at 3:11 PM, Daniel Johnson <computerdruid@gmail.com> wrote:
> > Isn't that syntax reserved for remotes?
> > for example:
> >
> > git push origin
> >
> > I feel like it would be a bad idea to have these 2 types of invocations
> > overlap in syntax like that.
> 
> The idea is that given "git push <branch>" if <branch> is NOT a remote but
> IS a branch name then git could unambiguously provide the correct remote.
> 
> Naturally if there's a branch and a remote of the same name then for backwards
> compatibility the remote would be chosen.

Please don't do that. Imho, this introduces too much magic in the behavior of git-pull, making it less intuitive to understand and, thus error-prone.

Cheers, Sebastian

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin
Previous: Eric Raible
Message 3 of 3 in “Re: git push <branch-name>”
  1. Daniel JohnsonOct 5, 2010
  2. Eric RaibleOct 5, 2010
  3. Sebastian HarlOct 6, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.