Search code examples
gitgit-branchatlassian-sourcetree

GIT sourcetree - do we need to create local branch to pull new remote branch?


I have remote branches origin/master and origin/test on GitBucket server. When I will try to via source tree pull origin/test branch, which is not created locally in my working area on local PC, should I at first create a local branch with name "test" or source tree application will do it automatically?


Solution

  • Make sure to Fetch first

    http://1.bp.blogspot.com/-TEICx7yuKpk/VJXgv-Cp9DI/AAAAAAAABXM/wc9ROTgQbZk/s1600/Fetch.png

    Then, as described in "how to pull remote branch in source tree", you can checkout the remote branch into a local one.

    Expanding REMOTES > origin was very close: You need to double click on the remote branch there, in your case test.

    That will allow to create a new local branch based on the remote one.