Command: git checkout --track origin/remoteBranchName
$ git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/improveGroovyCodeAgain
remotes/origin/master
$ git checkout --track origin/improveGroovyCodeAgain
Switched to a new branch 'improveGroovyCodeAgain'
Branch 'improveGroovyCodeAgain' set up to track remote branch 'improveGroovyCodeAgain' from 'origin'.
$ git branch -a
* improveGroovyCodeAgain
master
remotes/origin/HEAD -> origin/master
remotes/origin/improveGroovyCodeAgain
remotes/origin/master
网友评论