creating a new branch from a tag is one of my most used git operations.
$ git checkout -b new_branch tag_name
How can I do this with sourcetree? Just right-klick on a tag name on the left pane dosen't give me this option ...
WHen i do this and try to push that branch up to origin i get this error git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --set-upstream origin 19.0:19.0 Pushing to http://gitlab.xxxx.com/engineering/xxx.git error: src refspec 19.0 matches more than one. error: failed to push some refs to 'http://gitlab.xxxx.com/engineering/xxx.git'; Completed with errors, see above.
This is only part of the answer. The method described above, branches only at the SHA. Does not have an option for tracking. Because Windows version (not sure about MAC) has an issue with "greyed" out tracking screen (will it ever git fixed :-)), there is a manual step of tracking the branch to the remote that can be done in the terminal shell.
git branch -u origin/<remote branch name> <local branch name>
This is for the case of an existing branch that is on the remote.
BTW - I have version 126.96.36.199 of Sourcetree - when in the remote list on the left, right clicking does allow branch creation with tracking option. This seems to answer the original post. One thing that is missing from that process, is that there is no option for not checking out the branch. If the checkout is done, at least tracking is available (not greyed out) . Wish the two branch dialogs were consistent. There are times when it is inconvenient to do a checkout, but still want to setup a local branch on the remote. As for the tracking menu issue/bug/feature, that is another story.
PS - Just noticed that this was talking about tags (no children) ... my response was for an existing branch ... still very similar..
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs