msysGit
TortoiseGit
WampServer2
cd C:\Program Files\Git\libexec\git-core copy C:\Program Files\Git\bin\libiconv-2.dll git-http-backend.exe
修改httpd.conf :
<directory />Options FollowSymLinksAllowOverride NoneOrder deny,allowAllow from all</directory>
在 httpd.conf 檔案末尾追加:
# Set this to the root folder containing your Git repositories.SetEnv GIT_PROJECT_ROOT E:/SvnServer# Set this to export all projects by default (by default,# git will only publish those repositories that contain a# file named “git-daemon-export-ok”SetEnv GIT_HTTP_EXPORT_ALL 1# Route specific URLS matching this regular expression to the git http server.ScriptAliasMatch \“(?x)^/git/(.*/(HEAD | \info/refs | \objects/(info/[^/]+ | \[0-9a-f]{2}/[0-9a-f]{38} | \pack/pack-[0-9a-f]{40}\.(pack|idx)) | \git-(upload|receive)-pack))$” \“C:/Program Files/Git/libexec/git-core/git-http-backend.exe/$1″ <Location />AuthType BasicAuthName “GIT ServerAuthUserFile “E:/SvnServer/htpassword”Require valid-user</Location>
切換到 Apache 安裝目錄下的 bin目錄
htpasswd -cmb E:/SvnServer/htpassword mythma 123456
cd E:\GitServergit init --bare mythma.gitgit update-server-info
使用TortoiseGit clone
git add .
git commit -m "Add"
git push origin master