Getting existing git branches to track remote branches

前端 未结 7 1035
一整个雨季
一整个雨季 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 21:56

    Fast forward three years (see what I did there :-) ), I tried to pull an untracked branch using Git Bash and received

    If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/ develop
    

    The following achieved what I needed:

    $ git branch --set-upstream-to=origin/develop develop Branch 'develop' set up to track remote branch 'develop' from 'origin'.

提交回复
热议问题