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

Re: [PATCH] Include a git-push example for creating a remote branch

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 6, 2007, 06:30 UTC
Message-ID
<7v8x7ke260.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<fc339e4a0709052257m4ddc5784obe64a8b75b79b19@mail.gmail.com>
"Miles Bader" <miles@gnu.org> writes:
> Maybe I"m weird, but I tend to think of the refs/... syntax as being
> for "only if you're doing something funny" cases.

The "refs/" syntax is there as the lowest level that is universally usable to create and any ref. It can be used to push to branches, tags, or even remotes (aka "simulated fetch in reverse").

It is just nobody felt strong enough reason to sugarcoat the normalized syntax with something like:

	git push --create remote foo v1.2.0

You can be a hero by updating git-push to take such, and make it interpret as if the user passed the normalized syntax which is:

	git push remote foo:refs/heads/foo v1.2.0:refs/tags/v1.2.0
Previous: Miles BaderNext: Carl Worth
Message 5 of 9 in “Include a git-push example for creating a remote branch”
  1. Include a git-push example for creating a remote branchShawn O. Pearce, Sep 6, 2007
  2. Miles BaderSep 6, 2007
  3. Shawn O. PearceSep 6, 2007
  4. Miles BaderSep 6, 2007
  5. Junio C HamanoSep 6, 2007
  6. Carl WorthSep 6, 2007
  7. Junio C HamanoSep 6, 2007
  8. Wincent ColaiutaSep 6, 2007
  9. Kristian HøgsbergSep 6, 2007

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.