Git Server
1. 安裝必要套件
# apt-get install git-core2. 建立repository
假設所有的project都欲放置/opt/git 並且建立名為project1的gita. # mkdir /opt/git
b. # mkdir /opt/git/project1
# cd /opt/git/project1
# git --bare init
Git Client
在使用者端,假設project的位置是~/projectA
# mkdir ~/projectA
# cd ~/projectA
# git init
# echo "project init">>init
# git add .
# git commit -m "init project"
# git remote add origin user@[IP]:/opt/git/project1
# git push origin master