Sharing a git repo on the network

February 6, 2010

If you find yourself on a network with other developers you'd like to share a git repo with, here's a simple way to do that. First, on your machine, the one with the git repo, you run this:

$ git daemon --base-path=/path/to/dir/with/repo --export-all

So if you have a git repo in your home directory called, foo, you would make the base path be your home directory. Then, assuming your IP is 192.168.1.42, others can clone the repo using:

$ git clone git://192.168.1.42/foo

Posted in Technology | Tags Git

Comments

1.

If you touch file 'git-daemon-export-ok' in the repo you'd like to export, then there's no need for the promiscuous '--export-all' switch.

# Posted By Jonathan Julian on Sunday, February 7 2010 at 12:57 AM

Comments Disabled