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

Re: Possible to make a totally empty repository for remote access?

From
Jeff King <peff@peff.net>
Date
Jul 14, 2007, 02:58 UTC
Message-ID
<20070714025819.GA22559@coredump.intra.peff.net>
In-Reply-To
<95A1FBFA-DCB7-4767-B857-89660822C6E6@wincent.com>
On Sat, Jul 14, 2007 at 04:19:41AM +0200, Wincent Colaiuta wrote:
Show 5 quoted lines
> To make such pushes easier in the future you can create a local shortcut 
> file, .git/remotes/shortcut (or similar), with contents like:
>
> URL: git.server.example.com:/pub/git/test.git
> Push: master

The "new" way (by "new" I mean available for over a year, since v1.4.1) is to put such configuration into your .git/config file:

[remote "shortcut"]
  url = git.server.example.com:/pub/git/test.git

Though if this is going to be the upstream from which you will be pushing and pulling, you may want to call it "origin" (which will make it the default for pushing and pulling).

Even more simply, you can get the same remote config that git-clone would have set up by using the git-remote command:

  $ git-init
  $ git-remote origin server:/pub/git/test.git
-Peff
Previous: Wincent ColaiutaNext: Jeff King
Message 4 of 6 in “Possible to make a totally empty repository for remote access?”
  1. Wincent ColaiutaJul 13, 2007
  2. Junio C HamanoJul 13, 2007
  3. Wincent ColaiutaJul 14, 2007
  4. Jeff KingJul 14, 2007
  5. Jeff KingJul 14, 2007
  6. martin f krafftJul 14, 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.