Ubuntu 下一步步安裝 Git Server
apt-get install git-core
git init --bare myprj
指定
--bare,當前 repository 下就只有 .git/ 下的 objects,而沒有真實文件。一般在 Server 端。
當一個
repository 初始化後, 裏面什麼也沒有。我們需要建立個 master branch,才能被正常 clone 到其他地方。
mkdir initial.commit
cd initial.commit/
git init
git remote add origin /home/lgao/sources/my_own/repositories/myprj/
touch Readme
git add Readme
git commit -m "initial commit"
git push
sudo apt-get install ssh openssh-server
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.