Sep 142012
 

When you have a local GIT repo that you want to share with someone else, this is what you have to do.
Assume your git repo is located in /User/git/myrepo

1. Reinit your git repo to enable sharing (man page)

cd /User/git/myrepo
git init share=true

2. Add a marker file to the .git directory to tell the daemon that it should be remotely accessible.
touch /User/git/myrepo/.git/git-daemon-export-ok

3. Start the GIT daemon (man page)
git daemon --base-path=/User/git

4. Now someone else can add your repository as a remote repository (man page)
git remote add RepoName git://your.host.name/myrepo

  3 Responses to “How to setup a GIT daemon”

  1. maybe the 1. command would be:
    #git init –shared=yes

  2. Though cloning works using these steps but pushing does not works. I have tried it on windows server.

Leave a Reply to Raniere Cancel reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>