| 知乎专栏 |
git-branch - List, create, or delete branches
$ git branch development $ git branch * master development
机遇分支创建分支
$ git checkout -b feature develop $ git push --set-upstream origin feature
$ git branch -d staging Deleted branch staging. $ git branch * master
删除远程分支
neo@Mac ~/A/conference (master|MERGING)> git push origin --delete --force master To git.netkiller.cn:meeting/conference.git - [deleted] master
$ git branch * master testing $ git checkout testing Switched to branch "testing" $ git branch master * testing
neo@MacBook-Pro-Neo ~/workspace/api.netkiller.cn % git checkout test neo@MacBook-Pro-Neo ~/workspace/api.netkiller.cn % git branch -m test testing neo@MacBook-Pro-Neo ~/workspace/api.netkiller.cn % git push --delete origin test neo@MacBook-Pro-Neo ~/workspace/api.netkiller.cn % git push origin testing