安装 git
sudo apt-get install git-core配置身份信息
git config --global user.name "yourname"git config --global user.email "your@email.com"
安装 ssh 相关服务
sudo apt-get install openssh-server openssh-client创建 git 用户
$ sudo adduser --system --shell /bin/bash --group gitsudo passwd git
永久性删除用户账号
userdel gitgroupdel git
usermod –G git git (强制删除该用户的主目录和主目录下的所有文件和子目录)
创建仓库
su git# sudo chown -R git:git helloworld/
git init --bare helloworld.git
clone
git clone git@localhost:/home/git/repositories/helloworld.git
git clone git@localhost:repositories/helloworld.git
clone 好仓库第一次提交
git push origin master