1

I am pretty new to Git. Trying to setup git repository in window server 2008 R2. I have finish with everything even tried to create new repository and cloning on same computer everything look good. Now I want to clone to my local computer using git protocol. While reading document I figure out that

git daemon --verbose --export-all

command will help and this trick work well for me. Only issue for is I have to keep bash open. Is there any way that command automatically run (may be through window service) ever after my window restart and run in background?

Also find another option that creating empty file git-daemon-export-ok in repository should work as well. I had created file with same name under my bare repository but doesn't work.

Any help?

Pritesh Patel
  • 1,969
  • 1
  • 18
  • 32
  • [this](http://stackoverflow.com/questions/233421/hosting-git-repository-in-windows) might help – vpatil Feb 22 '12 at 10:30
  • I had gone through that post but this is little long process and newer version of msysgit support daemon from git directly without cygwin. – Pritesh Patel Feb 22 '12 at 10:43

1 Answers1

0

What about running the following from Cygwin? This will set the daemon up as a typical Windows service that means you never need to worry about starting/stopping it again and you don't have to leave any windows open.

cygrunsrv --install git-daemon -p $(which git) --args "daemon --base-path=/cygdrive/c/Projects --base-path-relaxed"

... where /cygdrive/c/Projects is set to the location that is the parent directory of all your projects that you want to share.

Do not forget to give permission for each of your repositories to be exported by the daemon. This can be achieved by running touch .git/git-daemon-export-ok in each repository that you want to export.

I found another alternative at this location.

Mark
  • 1,884
  • 2
  • 25
  • 36