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?
If you're using Sourcetree, Bitbucket gives you a single button checkout. In the repository's Branches, click the branch you want to checkout. Press the Check out button to display the appropriate check out command.
In order to checkout a remote branch you have to first fetch the contents of the branch. In modern versions of Git, you can then checkout the remote branch like a local branch. Older versions of Git require the creation of a new branch based on the remote .
Pull changes from a remote repositoryClick the Pull button in the toolbar. Select the remote repository to pull from. Select the remote branch to pull changes from. Click OK.
With SourceTree (1.9.6.1) alone (not talking about the command-line here), make sure:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With