拜讀 Tsung 的 Git Server 大作,也試著自己建立 git server。
不過設定途中發生一些問題,順便記錄下來。
在第一次 git clone ssh://project_ip/git/project.git 時候,一直發生 fatal: no matching remote head 錯誤訊息,根據 G 大師開示,解決方法是:
在第一次專案建立時,Client 端的指令:
mkdir test
cd test
git init
touch .git/git-daemon-export-ok
git remote add origin ssh://project_ip/git/project.git
touch index.html
git add index.html
git commit -m "init"
git push origin master
讓 project 內有檔案,而其他電腦的 client 部份,直接 git clone 就沒有問題。
準備把手上程式上到 git 了。
没有评论:
发表评论