Git分支

分支查看git branch
分支创建git branch <branchName>
分支切换git checkout <branchName>

分支拉取git pull origin <branchName>
分支克隆git clone -b <branchName> git@gitlab.alibaba-inc.com:xxx.git

分支提交
git add README.md
git commit -m"update readme file"
git push -u origin <branchName>

合并分支到主干
git checkout master
git merge <branchName>
git merge <branchName>

! [rejected] branchName -> branchName (non-fast-forward)
先执行下面操作:
git fetch
git merge

上一篇:git分支主干同步命令


下一篇:表弟说,这个Python定时任务,能挣五千,问我信吗?