可以隐藏分支的 Git 历史可视化 GUI?

发布于 2024-10-19 05:33:04 字数 988 浏览 6 评论 0原文

我开始通过 bazaar 学习 DVCS,因为它对新手友好,最近由于它的速度而转向 git 来完成我的日常工作。我在 bazaar 中怀念的一件事是 bzr qlog 对话框,您可以通过单击加号来隐藏或显示开发线,如下所示。

bzr qlog 显示可隐藏分支

我想为 git 找到类似的东西。我已经检查了此处这里,我想我设法从 这里 获取所有相关的内容。 wiki.kernel.org/index.php/InterfacesFrontendsAndTools#Graphical_Interfaces" rel="nofollow noreferrer">此处。有人知道具有可隐藏分支的实现吗?请注意,我并不是说能够指定所有分支而不是单个分支,而几乎所有 GUI 都可以做到这一点。我的意思是能够隐藏或显示单个分支内任何合并提交的 ^2 侧。

我更喜欢开源和跨平台,但甚至会接受商业和/或仅 Windows 的东西。我想我可以使用 bzr-git 继续使用 bazaar 只是为了查看历史记录,但这可能会产生比它解决的更多的可用性问题,更不用说首先促使切换的速度问题了。

话虽这么说,如果这个功能没有可用的实现,是否是因为 git 和 bazaar 之间的一些技术差异导致它不可行?或者由于典型的工作流程或其他非功能原因,任何使用 git GUI 的人都还没有想到这一点?如果没有无法克服的技术原因,我可能会花时间自己做出特殊的贡献。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

佞臣 2024-10-26 05:33:04

GitKraken 是新来的;它允许您仅选择您想要查看的分支。它还处于起步阶段,我发现它有点问题,但仍然有用

https://www.gitkraken.com/

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/

眼波传意 2024-10-26 05:33:04

您正在执行的操作的底层命令是 git log ,它有许多用于限制要显示的提交的选项。 gitk 接受其中的许多内容来限制显示的图形,或者您可以直接使用 git log (例如: git log --graph --abbrev-commit --pretty=oneline --decorate)在命令提示符中查看树。

要显示一组特定的分支,只需将它们列为 gitk (gitk master pu) 的参数即可,仅显示可从这两个头访问的提交。您还可以通过使用 --branches 选项 (gitk --branches="pt/*") 来使用 glob 表达式来显示可从带有 pt/ 前缀的所有分支访问的提交。

--not 选项(gitk --branches="pt/*" --not pu)表示所有可从分支 pt/* 访问的提交,而不是任何可从 pu 访问的提交。因此,您只能看到每个 pt/* 分支的前几个提交,这可能不是您所想到的。

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.

烟酒忠诚 2024-10-26 05:33:04

Atlassian 的 SourceTree 程序是学习 git 的绝佳方式!
我仍然用它来快速可视化我的分支。

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

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

南薇 2024-10-26 05:33:04

我也一直在寻找这个功能,我想知道为什么它没有得到更多客户端的支持。在命令行上,它是 git log 的 --first-parent 选项,但是没有简单的方法来展开分支。

据我所知,唯一支持此功能的客户端是 SmartGit (我不隶属于 SmartGit以任何方式)。每个带有“+”的提交都是合并提交,通过单击“+”,分支将展开,如下例所示:

SmartGit First Parent example

更新:我遇到了一个命令用Python编写的行日志查看器,可以折叠分支: https://github.com/kalkin/ git-log-viewer

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文