GIT
管理GIT
创建新的仓库
git init
链接远程仓库
git remote add origin git@github.com:tdm0/py-jg-bx.git
推送更新到远程仓库
git push origin master
克隆远程仓库
git clone git@github.com:tdm0/py-jg-bx.git
自建远程仓库
1创建GIT用户
添加用户
git config --global user.name "gituser"
添加用户的邮箱
git config --global user.email "1@1.com"
启动接受拒绝分支功能
git config receive.denyCurrentBranch ignore
2创建系统用户
adduser git
su git
3建立存储秘钥的文件夹
mkdir .ssh
cd .ssh
touch authorized_keys
4建立仓库
mkdir res.git
cd res.git/
git --bare init