Branching operations 1. View Remote Branch
前面带*号的代表你当前工作目录所处的分支$ git branch -a * br-2.1.2.2 master remotes/origin/HEAD -> origin/master remotes/origin/br-2.1.2.1 remotes/origin/br-2.1.2.2 remotes/origin/br-2.1.3 remotes/origin/master
2. View local Branch
$ git branch* br-2.1.2.2 master
3. Create a Branch
GIT branch test
4. Switch the branch to test
git checkout Test
5. Delete local Branch
Git branch-d test
6. Push the branch to the remote branch
Git push origin test
7. Branch Transfer
When the git rebase:rebase command executes, it actually moves the branch point from C to G, so that the branch has a function from C to G
8. Branch Reset
Git Reset: The current working directory is completely rolled back to the specified version number, assuming that we have a-g five commit version, where C is the version number is BBAF6FB5060B4875B18FF9FF637CE118256D6F20, we executed the ' git reset Bbaf6fb5060b4875b18ff9ff637ce118256d6f20 ' Then there's only one a-c. Three submitted versions
Git branch use