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

Re: Adding push configuration to .git/config

From
Steffen Prohaska <prohaska@zib.de>
Date
Nov 22, 2007, 18:22 UTC
Message-ID
<D77878D1-127E-4B0C-99DF-D344845B76B0@zib.de>
In-Reply-To
<Pine.LNX.4.64.0711221120300.27959@racer.site>
On Nov 22, 2007, at 12:23 PM, Johannes Schindelin wrote:
Show 7 quoted lines
> I have to say that I slowly grow an antipathy for "git push" without
> parameters.  _All_ of the confusions with push that I saw stem from  
> being
> too lazy to say where and what you want to push.  (Okay, there is this
> other thing where people say "git push origin master:master" and I  
> still
> do not know where they got _that_ from.)

I don't agree. "git push" should support good defaults. At some point you make the decision to publish, and you use "git push" for this. If you have a reasonably stable environment there will be a good default, what publishing means.

Obviously users should think before they "git push". They know that they are publishing, and they (hopefully) understand that they can't easily undo this operation. But I believe people who used any version control system before know that. It's the same for every system. If you publish, others can get your source, and this can't easily be reverted.

But people are lazy, and having a good default is what they expect from a good tool. The default should be safe, and reliably do something useful. A good default can safe you from typing errors. But the default should not do too much, and should not do unexpected things; at least not until you explicitly configured.

You know that I believe the current default is not such a choice. Pushing matching branches sooner or later triggers annoying errors if used with a shared remote repository. But this is how the default is; and I'll live with it.

At least it saves me time. I learnt to ignore the error messages. And we now have '--dry-run'. So I can quickly check what will happen.

But, I strongly believe that a tool that expects users to type the current branch and the default remote each time; just for publishing some changes to the default location, is not what users want.

	Steffen
Previous: Andreas EricssonNext: Nico -telmich- Schottelius
Message 12 of 16 in “Adding push configuration to .git/config”
  1. Nico -telmich- SchotteliusNov 21, 2007
  2. Steffen ProhaskaNov 21, 2007
  3. Junio C HamanoNov 22, 2007
  4. Steffen ProhaskaNov 22, 2007
  5. Andreas EricssonNov 22, 2007
  6. Junio C HamanoNov 22, 2007
  7. Junio C HamanoNov 22, 2007
  8. Steffen ProhaskaNov 22, 2007
  9. Johannes SchindelinNov 22, 2007
  10. Junio C HamanoNov 22, 2007
  11. Andreas EricssonNov 22, 2007
  12. Steffen ProhaskaNov 22, 2007
  13. Nico -telmich- SchotteliusNov 28, 2007
  14. Johannes SchindelinNov 28, 2007
  15. Junio C HamanoNov 29, 2007
  16. Jakub NarebskiNov 30, 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.