Sublime Forum

A few miscellaneous questions (Merge)

#1

First, I wanted to thank you guys for the massive update. The updates here are already helping out a ton and are much appreciated.

I have a question about searching for a commit. After I’ve searched for a commit (command+F) and found the one I’m looking for, is there an easy way to tell which branch that commit belongs to? I’m looking around and I don’t see where it is on the UI. The search searches all the branches, so I’m not sure how to find which branch a commit belongs to.

Secondly, is this still being considered at all for a future update? https://github.com/sublimehq/sublime_merge/issues/221

Thanks guys

0 Likes

#2

Hi @josephtlyons,

Thanks for using Sublime Merge - we’re glad you’re enjoying the new update!

Currently we don’t have any specific functionality to indicate which branches a certain commit is part of.
I’ll definitely be sharing this idea with the team.

In the meantime, you can use a custom command to achieve this:

  1. Open the user packages folder: Preferences > Browse Packages… then navigate to the User directory
  2. Create a file named Commit.sublime-menu
  3. Add the following
[
    { "caption": "-" },
    {
        "caption": "List Containing Branches",
        "command": "git", "args": {
            "argv": ["branch", "-a", "--contains", "$commit"]
        }
    },
]

and save the file.

You should now have an entry in the commit context menu that says List Containing Branches.
Running the command will cause a new entry will appear in the git output console (available next to the pop stash button).

Let me know how this goes!

Kind regards,
- Dylan

4 Likes

How to know branches that contains commit in SublimeMerge?
#3

In regards to the coloring request mentioned, we’ve definitely got this on our radar!

If you haven’t already, I’d suggest giving it a thumbs up on the issue tracker.

0 Likes

#4

I will give your suggestion a try, thanks. Yeah, being able to find commits in Merge is such a great experience. Often times, I’m asked to do cleanup work in our issue tracker, which usually involves finding issues that have been resolved and getting links to their commits put into the issues (this happens with hot fixes, where the fix doesn’t justify an entire branch to be made and the commit is made directly into the main branch). Merge is my secret tool for finding these commits. However, after I find them, I then have to manually find what branch they are in, which isn’t always easy. So having some sort of branch-identifying information somewhere attached to the commit would be great.

Additionally, if I was given the chance to make another suggestion, it would be to allow a user to open a commit on the remote branch through a browser. In GitHub Desktop, you can right click any commit and click “Open in GitHub” and it’ll open your default browser and take you to the commit on the website. I’m not sure how hard or possible this would be, seeing as how merge can be used with many source control websites, but maybe it is possible.

0 Likes

#5

@djohnston, just wanted to update you and say that your workaround is very helpful. Thanks for giving me the instructions to do that, it will save me a massive amount of time! I’d love it if this became a built-in feature at some point, but this definitely works as well.

I’m very happy with the newest update to Merge, just wanted to reiterate it! Thanks again!

2 Likes