Getting existing git branches to track remote branches

前端 未结 7 948
一整个雨季
一整个雨季 2021-01-29 21:43

My usual workflow when working with git, is something like this:

  1. create a local repository
  2. do some work in that repository, add/change files etc.
相关标签:
7条回答
  • 2021-01-29 22:09

    You can also use this if you want to create a new local branch to track a remote branch:

    git checkout --track -b [branch_name] --track origin[or other remote name]/[remote_branch_name] 
    

    or even better:

    git checkout -t origin/branch_name
    
    0 讨论(0)
提交回复
热议问题