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

Re: [PATCH] push: Learn to set up branch tracking with '--track'

From
Jeff King <peff@peff.net>
Date
Feb 6, 2009, 14:10 UTC
Message-ID
<20090206141000.GC18364@coredump.intra.peff.net>
In-Reply-To
<alpine.DEB.1.00.0902021449370.3586@pacific.mpi-cbg.de>
On Mon, Feb 02, 2009 at 02:52:26PM +0100, Johannes Schindelin wrote:
Show 15 quoted lines
> > It looks like the consensus is to add a branch.master config section 
> > even when cloning an empty repo. And that should address my concern in 
> > the 99% of cases where people use the default "master" setup. Which kind 
> > of takes away the main use case for this topic.
> 
> From where I sit, the main use would have been:
> 
> 	# <hackhackhack>
> 	$ git init
> 	$ git add .
> 	$ git commit -m initial\ revision
> 	# <hackhackhack>
> 	# <create a repository on repo.or.cz>
> 	$ git remote add origin $URL
> 	$ git push -t origin master

Hmm. True. The "clone empty" fix only affects people who use the "init; clone empty; push" method. Push-tracking would work for the "traditional" method you outline above.

So probably it is worth doing the steps I described earlier. I'll throw it on my todo list, but the priority is not especially high.

> BTW I always wondered if it would make sense to introduce "git commit 
> --init" for the first 3 Git commands.  I use them way too often.

I have noticed that, too, but I think it is because I am constantly creating test repos to debug git. Regular users don't have the same problem. :)

-Peff
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 14 of 15 in “push: Learn to set up branch tracking with '--track'”
  1. push: Learn to set up branch tracking with '--track'Johannes Schindelin, Jan 29, 2009
  2. Sverre RabbelierJan 29, 2009
  3. Johannes SchindelinJan 29, 2009
  4. Johannes SchindelinJan 29, 2009
  5. Jeff KingJan 29, 2009
  6. Jeff KingJan 29, 2009
  7. Johannes SchindelinJan 30, 2009
  8. Jeff KingJan 30, 2009
  9. Johannes SchindelinJan 30, 2009
  10. Jeff KingJan 30, 2009
  11. Johannes SchindelinJan 30, 2009
  12. Jeff KingFeb 2, 2009
  13. Johannes SchindelinFeb 2, 2009
  14. Jeff KingFeb 6, 2009
  15. Johannes SchindelinFeb 6, 2009

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.