安装git
先使用将ppa源加入Ubuntu
sudo add-apt-repository ppa:pdoes/ppa
2、然后根据提示,输入回车。加入密钥
3、输入以下命令
sudo apt-get update
sudo apt-get install git-core
ok,完成了。
linux服务器搭建git服务器方法:http://www.linuxdiyf.com/linux/14680.html
Ubuntu Git服务器搭建及Gitosis安装设置:http://www.linuxdiyf.com/linux/14589.html
搭建git服务器(fedora22-server):http://www.linuxdiyf.com/linux/13141.html
Ubuntu完美安装搭建Git服务器:http://www.linuxdiyf.com/linux/13045.html
搭建git服务器:http://www.linuxdiyf.com/linux/12685.html
个人操作
新增git用户角色
sudo useradd -m git
sudo passwd git
进入/home/git/
sudo git init –bare myrep.git
修改权限
sudo chown -R git:git /home/git/myrep.git
sudo chmod 755 -R /home/git/myrep.git/objects
另一台pc推代码测试
echo test >> testfile
git add testfile
git commit -m “testfile”
git push