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

Re: [RFC/PATCH] push: introduce implicit push

From
Jakub Narębski <jnareb@gmail.com>
Date
Apr 14, 2013, 08:33 UTC
Message-ID
<516A69E3.2090805@gmail.com>
In-Reply-To
<7vehed7ilu.fsf@alter.siamese.dyndns.org>
W dniu 14.04.2013 06:42, Junio C Hamano pisze:
Show 16 quoted lines
> I personally think it is much more sellable to use an even simpler
> rule than what Jeff suggested, to make
> 
> 	git push -- <refspec>
> 
> go to the remote.pushdefault (falling back to remote.default that is
> "origin"), without even paying attention to what branch you are on,
> and ignoring branch.*.remote/pushremote configuration.
> 
> That is sufficient to support the triangular, the publish-to-mine,
> and the centralized workflows, no?  In any of these cases, the
> repository you push out to is _one_, even though it may be a
> different one from where you pull from.  If you have a very special
> branch that goes to a different place than all the other branches,
> you can always push out while on that branch without any refspec,
> anyway.

I think it also supports users of 'matching' that have push default correctly configured. Currently they can use "git push" in all cases but first push of a branch, where they had to use "git push origin branch", or "git push pushremote branch", and with those changes can now simply use "git push -- branch".

Nice.

Here I think simpler is better, especially that diferent users have different expectations: push to remote based on current branch or push to remote or remotes based on branch or branches being pushed.

-- 
Jakub Narębski
Previous: Junio C HamanoNext: Ramkumar Ramachandra
Message 5 of 21 in “push: introduce implicit push”
  1. push: introduce implicit pushRamkumar Ramachandra, Apr 12, 2013
  2. Junio C HamanoApr 12, 2013
  3. Ramkumar RamachandraApr 13, 2013
  4. Junio C HamanoApr 14, 2013
  5. Jakub NarębskiApr 14, 2013
  6. Ramkumar RamachandraApr 14, 2013
  7. Junio C HamanoApr 15, 2013
  8. Johannes SixtApr 15, 2013
  9. Junio C HamanoApr 15, 2013
  10. John KeepingApr 15, 2013
  11. Ramkumar RamachandraApr 15, 2013
  12. John KeepingApr 15, 2013
  13. Junio C HamanoApr 15, 2013
  14. Ramkumar RamachandraApr 15, 2013
  15. John KeepingApr 15, 2013
  16. Felipe ContrerasApr 15, 2013
  17. John KeepingApr 15, 2013
  18. Felipe ContrerasApr 15, 2013
  19. Ramkumar RamachandraApr 15, 2013
  20. Jonathan NiederApr 16, 2013
  21. Jonathan NiederApr 16, 2013

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.