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