Skip to content

Instantly share code, notes, and snippets.

@kbinani
Created March 28, 2013 04:28
Show Gist options
  • Save kbinani/5260623 to your computer and use it in GitHub Desktop.
Save kbinani/5260623 to your computer and use it in GitHub Desktop.
A git-daemon starter script for Windows.
' About:
' A git-daemon starter script for Windows.
'
' Workflow:
' 1. C:\>mkdir GitRepositories
' 2. C:\>cd GitRepositories
' 3. C:\GitRepositories>mkdir sample.git
' 4. C:\GitRepositories>cd sample.git
' 5. C:\GitRepositories\sample.git>"C:\Program Files\Git\bin\git.exe" init --bare
' 6. Edit this script to change 'git' and 'repository_base_path'
' 7. Start this script
'
' How to stop git-daemon:
' Kill the "git-daemon.exe" process in your task manager.
'
' Misc:
' See more information about git-daemon windows;
' * http://thinking-megane.blogspot.jp/2012/07/windowsgit.html
git = "C:\Program Files\Git\bin\git"
repository_base_path = "C:\GitRepositories"
command = """" & git & """ daemon --verbose --export-all --enable=receive-pack --base-path=" & repository_base_path
CreateObject("WScript.Shell").Run "cmd /c " & command, vbHide, False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment