Git history visualizer GUI that can hide branches?
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.
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.
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/
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.
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
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:
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
精彩评论