知乎专栏 |
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 * 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