SourceTree: How can I merge from a tag?

Alex Rodrigues August 20, 2014

I am able to merge from the tip of a branch but do not see an option to merge from a tag. Is this possible within SourceTree?

1 answer

1 accepted

1 vote
Answer accepted
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 20, 2014

Are you wanting to merge the entirety of a branch up to a tagged commit, or just the single commit?

To "merge" just the one commit, you want to right click the commit (no tag necessary) and "Cherry pick" it.

To merge a branch up to a tag that isn't the latest commit in that branch, you'll need to create a new branch on that commit, then merge with the new branch.

Tags are just named commits. There is really nothing you can do with them that you can't do with a commit hash.

Alex Rodrigues August 26, 2014

Yes, I want to merge the entirety of a branch up to a tagged commit. Using the Git command-line I can do this in one step (i.e. git merge <tag>) so I was expecting a way to do this in one step using SourceTree withouth having to create a new branch.

I will consider submitting an enhancement request for this functionality to be added to SourceTree

Alex Rodrigues August 26, 2014

Well since I typically merge from a tag on a different branch (not the one I have checked out), I need to be able to display the history & tags of the other branch to be able to right-lick it, but that does not appear to be possible in SourceTree

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 26, 2014

Looks like you may be able to right-click any commit in the graph and choose "Merge...". I haven't tried this myself, so I don't know what to expect.

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 26, 2014

Sure you can. Above the graph, change the dropdown from "current branch" to "all branches".

Alex Rodrigues August 26, 2014

Ahhh, didn't realize that! However I now find that I have too much information making it tought to find the tag that I want with lots of scrolling required. Is there a way to easily zero down on the tag that I am looking for?

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 26, 2014

Use the Search tab, right click on the commit you want and "View in Full Log".

Alex Rodrigues August 26, 2014

Took me awhile to find the "Search tab" right at the bottom. This tab allows me to search by Authors, Commit Messages and File Changes but not by tags which is not that straight-forward as I might know the tag name but not necessarily the commit mesasge associated with it.

The "Jump to" option in the top right-hand corner seems to hold more promise. However the drop-down does not have a scroll-bar making it tough to find the tag I am looking for (if it is way down in the list) and requiring me to scroll a lot using the mouse wheel. Can this be enhanced?

The "Jump to" option also contains a "Jump to Commit" option within it. It would be great if this could be enhanced to provide the ability to Jump to branch or tag that is typed in

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events