美文网首页Git
Git fetch and checkout a remote

Git fetch and checkout a remote

作者: JaedenKil | 来源:发表于2021-09-26 17:12 被阅读0次

    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
    

    相关文章

      网友评论

        本文标题:Git fetch and checkout a remote

        本文链接:https://www.haomeiwen.com/subject/fqaqnltx.html