Pavlo Pavlo - 2 months ago 30
Git Question

SourceTree - how to checkout to remote repo branch

I create a new branch in remote GIT repository. Repository stored on BitBucket.

In my my local repository I can see this new branch with SourceTree. It appears in commits list, on same commit I create branch from. But I cannot see this new branch under branches list and cannot checkout it.

I want to checkout and push updated on my local workstation code to remote repository back, but within exactly this new branch. I started development on same branch, what was source to clone new branch.

I tried to pull this new branch. It is empty as it should, but it still not under branches list and I cannot checkout it.

How to commit to this new branch?


With SourceTree ( alone (not talking about the command-line here), make sure:

  • you have fetched the repo
  • your log view is set to "All Branches" (not "current branches")
  • "Show Remote Branches" is selected

Note: the BRANCHES section at the left side of the log view only display local branches, not the remote ones.
The remote branches are list in the REMOTES/origin section, just below BRANCHES and TAGS.

By double-clicking on the remote branch, you can create a new local branch.

checkout new branch from remote tracking branch