in the timeline view where all branches/ merges of branches are shown, how can I see the name of the branches?
other than the occasional name at the very top/ HEAD?
thanks
in the timeline view where all branches/ merges of branches are shown, how can I see the name of the branches?
other than the occasional name at the very top/ HEAD?
thanks
As far as I’m aware, with regards to branch names and the commit graph the names of branches are only displayed at their head commit, both in the graph and in the pane on the right in the commit details when you select that commit.
Apart from the head commit, I don’t think git contains any information as to what branch a commit originally came from? Or if you will, if I create branch new-branch
, make 4 commits, merge that branch back with master
and then delete new-branch
, I don’t think there is any historical way to know what the name of the branch was when those 4 commits were made.
The git command git branch -a --contains <hash>
gets git to display the names of all branches whose commit tree contains the commit hash you provide, which always seems to be constrained to only branches that currently exist.
If you’re interested in that kind of information, you can add the following to a file named Commit.sublime-menu
in your Merge User
package to add a command to the context menu in the commit tree to execute that command (output viewable by clicking the icon in the info bar):
[
{ "caption": "-", "id": "end" },
{
"caption": "Show Branches containing this commit...",
"command": "git",
"args": {"argv": ["branch", "-a", "--contains", "$commit"]}
},
]
this actually makes much sense to me, hadn’t thought about it this way. I just thought a GUI should provide this information although I never missed it in the CLI yet, but your argument might be the reason why I have not seen it in the CLI.
thanks for the git command help as well !
The only solution I can imagine was to add a list of “contained by …” to the commit details panel.
GitExtensions lists all branches and tags, that contain a selected commit.
Hi,
I would like to ask if there are plans to provide the branch name of a commit like depicted here by @vser35 in Sublime Merge?
Sure, I am using the provided command in Commit.sublime-menu
, but it when performing a search and viewing multiple commit results, it would be way easier to see the branch names of the results at a glance. For example in the Summary tab or even better below each commit.
Background: I was searching for a keyword and found an appropriate commit. I was assuming, this is commit is on main branch, but then wondered, that the result was on a different branch on remote, which I have not checked out, since it is not on main.
Thank you for your support and this great tool!
FTR, here’s an github issue regarding containing branches:
So you might want to upvote it.