git仓库操作
1.建立服务端仓库(SSH协议)
git init --bare first.git #初始化一个仓库 git config --global color.ui true #配置显示颜色界面 git config --global user.name 'first' git config --global user.email 'first@okgoes.com'
2.初始化客户端仓库
git clone root@192.168.136.151:/data/git/first/first.git #回车后输入136.151的root密码 cd first git config --global user.name 'client' git config --global user.email 'client@okgoes.com' vim index.html git add index.html git commit -m 'add index.html' git push -u origin master #提交到远程服务器 git status
3.gitHTTP协议
1).创建和配置git仓库