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

Re: What's cooking in git.git (Jan 2009, #07; Wed, 28)

From
Jeff King <peff@peff.net>
Date
Jan 30, 2009, 04:59 UTC
Message-ID
<20090130045916.GC18655@coredump.intra.peff.net>
In-Reply-To
<20090129120455.GD3027@denkbrett.schottelius.org>
On Thu, Jan 29, 2009 at 01:04:55PM +0100, Nico -telmich- Schottelius wrote:
Show 10 quoted lines
> I must confess, as a user I would like to do
> 
> 1. create local repo
> 
> 2. create a remote
> 
> 3. push it
> 
> I don't care about creating empty repos somewhere:
> My aim is to publish my work, that's it.

I think people have asked for that before, too. The fundamental problem is that we don't necessarily know how to create the remote repo, or even have permissions to do so.

If your transport is vanilla ssh, then in theory we could turn "host:path.git" into "ssh host 'GIT_DIR=path.git git init'". But for other transports we are out of luck. And for hosting sites like github, we are out of luck, as you use the web interface to make a new repo.

>   1.2. When creating a new repo, it would be helpful if I can directly add a
>        description: git init [description] would be nice to have

I don't think there is any fundamental reason not to allow more setup of internal .git/* files through 'init'. In most cases, you could just as easily "echo description >.git/description" afterwards, but it might be slightly more convenient if you are ssh'ing to do it all in one shot.

>   2.1. I (as a user) understand that I need to create a remote where I have to
>        push to. It would be helpful to specify --track-this/--merge-this to
>        have it automatically connected to the current branch
  git remote add -t master origin $URL ?
>   3.1.  I would really like to see something like git push
>         --create[-if-not-exists]. This makes sense for me, but could also
>         be a global configuration option (push.autocreate = true|false).
I think this would be better as a feature of "git remote". I.e.:
  git remote add --create -t master origin $URL

but again, we can only sanely do creation magic in a subset of cases. Which is why I think nobody has implemented it so far.

-Peff
Previous: Nico -telmich- SchotteliusNext: Charles Bailey
Message 24 of 30 in “What's cooking in git.git (Jan 2009, #07; Wed, 28)”
  1. Junio C HamanoJan 29, 2009
  2. Jeff KingJan 29, 2009
  3. Jeff KingJan 29, 2009
  4. Jeff KingJan 29, 2009
  5. Junio C HamanoJan 29, 2009
  6. Sverre RabbelierJan 29, 2009
  7. Jeff KingJan 29, 2009
  8. Pieter de BieJan 29, 2009
  9. Sverre RabbelierJan 29, 2009
  10. Jeff KingJan 29, 2009
  11. Sverre RabbelierJan 29, 2009
  12. Jeff KingJan 30, 2009
  13. Johannes SchindelinJan 30, 2009
  14. Jeff KingJan 30, 2009
  15. Junio C HamanoFeb 1, 2009
  16. Junio C HamanoFeb 12, 2009
  17. Sverre RabbelierFeb 12, 2009
  18. Johannes SchindelinFeb 12, 2009
  19. Junio C HamanoFeb 12, 2009
  20. Johannes SchindelinFeb 12, 2009
  21. Jeff KingFeb 12, 2009
  22. Jeff KingJan 29, 2009
  23. Nico -telmich- SchotteliusJan 29, 2009
  24. Jeff KingJan 30, 2009
  25. Charles BaileyJan 29, 2009
  26. Junio C HamanoJan 29, 2009
  27. Charles BaileyJan 29, 2009
  28. Charles BaileyJan 30, 2009
  29. Kirill SmelkovFeb 1, 2009
  30. Junio C HamanoFeb 1, 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.