811月/118
Git初始化错误小记
在第一次 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 push就可以了
If you often merge with the same branch, you may want to
configure the following variables in your configuration
file:
branch.master.remote = <nickname>
branch.master.merge = <remote-ref>
remote.<nickname>.url = <url>
remote.<nickname>.fetch = <refspec>
请使用:
git config branch.master.remote origin
git config branch.master.merge refs/heads/master