Git fetch and checkout a remote
2021-09-26 本文已影响0人
JaedenKil
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