git分支
时间:2019-12-03 11:43:37
收藏:0
阅读:103
新建一个分支
git branch newBranch
检查分支是否创建成功
git branch
切换到新建的分支
git checkout newBranch
将改动提交到新分支
git add .
git commit -m "the new branch"
然后git status
检查是否提交新分支成功
切回到主分支
git merge newBranch
然后就可以push代码到远端仓库
git push -u origin master
删除新分支
git branch -D newBranch
评论(0)