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

Re: Starting a new project remotely

From
Junio C Hamano <junkio@cox.net>
Date
Jan 15, 2006, 19:24 UTC
Message-ID
<7vd5it47lr.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0601151323320.25300@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> writes:
Show 5 quoted lines
> Is there something currently that acts like git-clone, except that it sets 
> up automatic connections in the opposite direction? That is, you run it in 
> a repository with no origin, and it pushes the data to the specified 
> location (which probably needs to be set up already as an empty 
> repository) and sets the local side's origin remote to the location given.

The "git push" command allows you to push into an empty or even unrelated destination, but I do think there no wrapper that creates remotes/ file. BTW, calling that "origin" is probably confusing. In the scenario you outlined, your local side is the source and the remote is the sink.

FYI, here is what I have in my remotes/ko file to interact with my kernel.org repository (the one that is mirrored out to the public machines):

        URL: zzz.kernel.org:/pub/scm/git/git.git/
        Push: master
        Push: +pu
        Push: maint
        Pull: master:refs/tags/ko-master
        Pull: +pu:refs/tags/ko-pu
        Pull: maint:refs/tags/ko-maint
and with this, I first run
	$ git fetch ko
	$ git show-branch master ko-master

to make sure I am not rewinding what I have already pushed out by mistake, and then

	$ git push ko
        $ git push --tags ko ;# if I added a new tag
Previous: Daniel BarkalowNext: Daniel Barkalow
Message 2 of 3 in “Starting a new project remotely”
  1. Daniel BarkalowJan 15, 2006
  2. Junio C HamanoJan 15, 2006
  3. Daniel BarkalowJan 15, 2006

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.