Git history visualizer GUI that can hide branches?
Asked Answered
C

4

6

I started out learning DVCS with bazaar due to its newbie-friendliness, and have recently moved to git for my daily work due to its speed. The one thing I miss from bazaar is the bzr qlog dialog, that lets you hide or show lines of development by clicking on the plus sign, as shown here.

bzr qlog showing hideable branches

I would like to find something similar for git. I've checked the GUIs listed here and here, and I think I managed to get all the relevant ones from here. Is anyone aware of an implementation with hideable branches? Note, I don't mean being able to specify all branches versus a single branch, which almost all the GUIs can do. I mean being able to hide or show the ^2 side of any merge commit within a single branch.

I prefer open source and cross platform, but will accept even something commercial and/or windows only. I suppose I could use bzr-git to continue using bazaar just for viewing history, but that probably creates more usability problems than it solves, not to mention the speed issues that prompted the switch in the first place.

That being said, if there are no available implementations of this feature, is that because of some technical difference between git and bazaar that makes it infeasible? Or has it just not occurred to anyone working on git GUIs yet because of typical workflows or other non-functional reasons? If there are no insurmountable technical reasons, I might take the time to make that particular contribution myself.

Conformance answered 24/2, 2011 at 0:44 Comment(2)
Not yet. I do now know it's feasible, it just hasn't been done. One of these days I'll get around to adding it to one of the open source visualizers.Conformance
go for the official one - git gui & ;)Kristofor
F
3

GitKraken is new in town; it lets you select only the branches you'd like to see. It's in its infancy and I find it a bit buggy, but still useful

https://www.gitkraken.com/

Folder answered 12/5, 2016 at 23:38 Comment(0)
S
2

The underlying command for what you are doing is git log which has a number of options for limiting the commits to be shown. gitk accepts many of these to restrict the graph shown or you can use git log directly (eg: git log --graph --abbrev-commit --pretty=oneline --decorate) to see a tree in the command prompt.

To show a specific set of branches just list them as arguments to gitk (gitk master pu) just shows commits reachable from those two heads. You can also use a glob expression by using the --branches option (gitk --branches="pt/*") to show commits reachable from all branches with pt/ prefix.

The --not option (gitk --branches="pt/*" --not pu) means all commits reachable from branches pt/* and not any that are reachanble from pu. So you only see the top few commits for each of the pt/* branches which might not be what you were thinking of.

Sentinel answered 25/2, 2011 at 0:9 Comment(1)
Useful information, but not quite what I was looking for. What I want is more like the --first-parent option, but to be able to click on the GUI to "expand" selected other parents.Conformance
P
1

Atlassian's SourceTree program is a fantastic way to learn git! I still use it to visualize my branches quickly.

https://www.atlassian.com/software/sourcetree/overview

Pontone answered 26/9, 2013 at 20:43 Comment(0)
T
1

I have also been looking for this feature, and I'm wondering why it is not supported by more clients. On the command line it is the --first-parent option to git log, but then there is no ease way to unfold a branch.

The only client I'm aware of which supports this is SmartGit (I'm not affiliated with SmartGit in any way). Every commit with a "+" is a merge commit, by clicking the "+" the branch unfolds as shown in this example:

SmartGit first parent example

Update: I have come across a command line log viewer written in Python which can fold away branches: https://github.com/kalkin/git-log-viewer

Talanta answered 11/5, 2020 at 13:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.