Git 服务器的搭建 远程仓库通常只是一个纯仓库(bare repository)—一个没有当前工作目录的仓库。因为该仓库只是一个合作媒介,所以不需要从一个处于已从硬盘上检出状态的快照;仓库里仅仅是git的数据。更简单的说,纯仓库是你的项目里的.git内容。 开始架设git服务器的时候,需要把一个现存的仓库导出为新的纯仓库—不包含当前工作目录的仓库。方法很简单。把一个仓库克隆为纯仓库,可以使用clone命令的–bare选项。纯仓库的目录名以.git 结尾。 Git服务器搭建根据自己的需求选择不同的协议 Git支持http:// git:// ssh:// https:// file:// (本地) ssh://[user@]host.xz[:port]/path/to/repo.git/ git://host.xz[:port]/path/to/repo.git/ http[s]://host.xz[:port]/path/to/repo.git/ ftp[s]://host.xz[:port]/path/to/repo.git/ rsync://host.xz/path/to/repo.git/
1.1 Git协议的服务器搭建 1.1.1 安装git安装git软件,使用yum安装的方式
yum install git-* -y 安装git所有的包
git-all
git-cvs
git