git命令备注,以防忘记
步骤:
若没有ssh相应配置
则先创建ssh私钥
git config –global user.name “xxxxxxx”
git config –global user.email “xxxxx@xxxxx.com”
ssh-keygen -t rsa -C “xxxxx@xxxxx.com”
然后到gitlab中将ssh.pub中的私钥添加到gitlab中
git clone git@gitlab.corp.ctcn.com.cn:dingjunjie/wxapp.git
获取项目
cd 到相应目录
然后连接上游地址
git remote add upstream git@gitlab.corp.ctcn.com.cn:wx/wxapp.git
创建分支
git branch develop
切换到分支
git checkout develop
拉取最新的代码
git pull upstream develop:develop