centos git gitolite安装笔记
2014-08-26 13:33
337 查看
export PATH=/home/git/bin:$PATH
echo PATH
git branch 查看本地分支
git branch -a 查看远程分支
git fetch 获取远程分支
git checkout -b <local_branch_name> 创建分支并切换
git push origin <local_branch_name>:<remote_branch_name> 创建远程分支
git checkout <local_branch_name> 分支并切换
git branch -d <local_branch_name> 删除分支
git clone -b src https://github.com/...
git archive --remote=test:test.git HEAD:path/to/directory test.txt | tar -x
git archive --remote=test:test.git HEAD test.txt
git archive --remote=test:test.git HEAD:path/to/directory test.txt | tar -x
git archive --remote=test:test.git HEAD test/test.txt | tar -x
$ yum install git
$ rm -rf /home/git
$ mkdir /home/git
$ useradd -d /home/git git
$ passwd git
$ chown -R git.git /home/git
$ su git
$ cd ~
$ git clone git://github.com/sitaramc/gitolite
$ mkdir -p /home/git/bin
$ gitolite/install -ln /home/git/bin
$ export PATH=/home/git/bin:$PATH
$ echo $PATH
$ ./bin/gitolite setup -pk ~/root.pub (注:root.pub存放位置git用户名~/.ssh)
执行成功会示下面的初始化信息
Initialized empty Git repository in /home/git/repositories/gitolite-admin.git/
Initialized empty Git repository in /home/git/repositories/testing.git/
SSH 的客户端配置文件 ~/.ssh/config 可以通过创建主机别名,在连接主机时,使用特定的公钥。
例如 ~/.ssh/config 文件中的下列配置:
host server
user git
hostname 192.168.1.212
port 22
identityfile ~/.ssh/root
echo PATH
git branch 查看本地分支
git branch -a 查看远程分支
git fetch 获取远程分支
git checkout -b <local_branch_name> 创建分支并切换
git push origin <local_branch_name>:<remote_branch_name> 创建远程分支
git checkout <local_branch_name> 分支并切换
git branch -d <local_branch_name> 删除分支
git clone -b src https://github.com/...
git archive --remote=test:test.git HEAD:path/to/directory test.txt | tar -x
git archive --remote=test:test.git HEAD test.txt
git archive --remote=test:test.git HEAD:path/to/directory test.txt | tar -x
git archive --remote=test:test.git HEAD test/test.txt | tar -x
$ yum install git
$ rm -rf /home/git
$ mkdir /home/git
$ useradd -d /home/git git
$ passwd git
$ chown -R git.git /home/git
$ su git
$ cd ~
$ git clone git://github.com/sitaramc/gitolite
$ mkdir -p /home/git/bin
$ gitolite/install -ln /home/git/bin
$ export PATH=/home/git/bin:$PATH
$ echo $PATH
$ ./bin/gitolite setup -pk ~/root.pub (注:root.pub存放位置git用户名~/.ssh)
执行成功会示下面的初始化信息
Initialized empty Git repository in /home/git/repositories/gitolite-admin.git/
Initialized empty Git repository in /home/git/repositories/testing.git/
SSH 的客户端配置文件 ~/.ssh/config 可以通过创建主机别名,在连接主机时,使用特定的公钥。
例如 ~/.ssh/config 文件中的下列配置:
host server
user git
hostname 192.168.1.212
port 22
identityfile ~/.ssh/root
相关文章推荐
- 2014年3月30日,晚上,给CentOS安装Git和Gitolite
- CentOS 6.4x64安装git和gitolite服务器
- CentOS7 编译安装 Git 服务器 Centos 7.0 + Git 2.2.0 + gitosis (实测 笔记)
- CentOS 如何安装git server + Gitolite 【配置不成功需要再测试2015-8-20】
- centos7 安装 gitolite (git服务器)
- centos+git+gitolite 安装和部署
- CentOS安装git及使用Gitolite来管理版本库
- centos+git+gitolite 安装和部署
- centos+git+gitolite 安装和部署
- centos+git+gitolite 安装和部署
- centos系统 + git源码安装 + gitolite用户权限控制 安装与配置
- Centos+git+gitolite 安装和部署
- CentOS 6.4x64安装git和gitolite服务器
- 【CentOS笔记】CentOS在线安装Git
- 【学习笔记】ubuntu12.04安装与配置gitolite搭建git服务器
- 在Centos上安装git
- centos5.4 安装git
- git服务器安装所需软件包(centos5.2环境)
- 在centOS 上安装git
- 在CentOS5.4上安装Git