本地git仓库推送到服务器自建的git仓库实现目录文件同步教程
首先,先在服务器上安装git,如果有git的话就不用走这一步了 yum安装git [root@iZuf6fazwjb6lb3z82smzoZ ~]# cd src/ [root@iZuf6fazwjb6lb3z82smzoZ src]# wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm [root@iZuf6fazwjb6lb3z82smzoZ src]# rpm -ivh epel-release-5-4.noarch.rpm Preparing... ########################################### [100%] package epel-release-5-4.noarch is already installed [root@iZuf6fazwjb6lb3z82smzoZ ~]# yum list [root@iZuf6fazwjb6lb3z82smzoZ ~]# yum install -y git 创建一个用户来运行git服务 . [root@iZuf6fazwjb6lb3z82smzoZ ~]# adduser git //创建用户git [root@iZuf6fazwjb6lb3z82smzoZ ~]# passwd