// 將test分支合并到master分支中
1.切換到主分支
git checkot master
2.合并分支
git merge test
分支常用命令
git branch test // 新建test分支
git checkout -b test // 新建test分支并切換到新建分支
git branch // 查看分支
git push origin test // 分支push到遠程
git branch -m test test2 // 將分支test更名為test2
git branch -r // 查看遠程分支
git branch -a // 查看所有分支
git push origin --delete test // 刪除遠程分支
git push origin BRANCH // BRANCH是你遠程分支的名字
git branch -d badgebutton // 刪除本地分支
新建分支后,提交出錯
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
// 最新使用方式
git branch --set-upstream-to=origin/myBranch1