A clone of a project branch was made to my local drive and opened using Sourcetree. I then created a new feature branch from this project branch in JIRA and both branches are hosted in Bitbucket. However, Sourcetree seems unable to see the remote feature branch at all. I tried 'git fetch' , 'git checkout <feature_branch>'but still could not get the feature branch show up in Sourcetree.
I tried both Sourcetree and git command but neither worked. When I click 'Checkout in Sourcetree' next to the name of feature branch in Bitbucket, there is an error message showing 'origin/feature_branch is not a commit and a branch cannot be created from it'.
Could you please suggest what I need to do to to get the feature branch created from a project branch?
Can I ask where you see the origin/feature_branch is not a commit and a branch cannot be created from it error, in Sourcetree or Bitbucket?
If from the command line/terminal you run
You will see a list of all the local branches you have checked out.
If you run
>git branch --remote
you will see a list of all the branches available on the remote.
Can you see the branch you want in the remote list?
If it is you should be able to check it out
Thanks for your reply.
I saw that error message in Sourcetree after clicking 'Check out in SourceTree' (in a dropdown) next to the feature branch name in Bitbucket. Please see attached screenshot.
git branch --remote does not show this feature branch in Bash, although the branch shows up in Bitbucket.
The feature branch also does NOT show under REMOTES/origin in Sourcetree (left panel). Only the master branch is there.
I just created a new feature branch from the project branch for another JIRA ticket. I can see it in Bitbucket, however still the same, git branch --remote can only see the project branch but cannot find this new feature branch. And this new feature branch does not show up in REMOTES/origin in Sourcetree. 'Check out in Sourcetree' as mentioned above showed the same error message... 'this is not a commit and this branch cannot be created.'
This just happened to me to. Bizarre. Appears in Branches page of web UI, but no amount of `git fetch` would have it appear in VS's Team Explorer listing of branches, and trying to do `git checkout` would say "error: pathspec 'branch-name' dit not match any file(s) known to git".
Went for -b above and will see how I go pushing it back up.
Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events