简体   繁体   English

如何在 Windows 上可视化 GitHub 分支历史记录?

[英]How can I visualize GitHub branch history on Windows?

Every time I was thinking of switching all of our little team's projects to git / github, what pained me was that there didn't seem to be a tool to visualize all this social coding goodness.每次我想将我们所有小团队的项目都切换到 git/github 时,让我痛苦的是似乎没有一种工具可以将所有这些社交编码的优点可视化。

When we all start wildly branching, forking and merging, I feel we're going to need a tool that would let us graphically see the full picture of our repository and its multitude of branches, in order to come up with a plan to merge it all back at some point into one and only truth (the proverbial origin/master ).当我们开始疯狂地分支、分叉和合并时,我觉得我们将需要一个工具来让我们以图形方式查看我们的存储库及其众多分支的全貌,以便提出合并它的计划在某个时刻,一切都回到一个唯一的真理(众所周知的起源/大师)。

I've tried googling for such a visualization tool on several occasions, but came up empty handed.我曾多次尝试在谷歌上搜索这样的可视化工具,但都空手而归。 Was hoping that GitHub for Windows would solve this once and for all, but all it shows is linear history for a particular checked out branch.希望适用于 Windows 的 GitHub能够一劳永逸地解决这个问题,但它所显示的只是特定检出分支的线性历史记录。

What I'm looking for is something akin to what TortoiseHg has - a graph showing all branches and commits.我正在寻找的是类似于TortoiseHg 所拥有的东西 - 一个显示所有分支和提交的图表。 Are you aware of any such tools?你知道任何这样的工具吗? (We're on Windows.) (我们在 Windows 上。)

SourceTree seems friendlier than TortoiseGit for the graphs and you can interact with the graph as well. SourceTree在图形方面似乎比 TortoiseGit 更友好,您也可以与图形进行交互。

源树

Stick with msysgit坚持使用 msysgit

gitk --all 

is what you want.是你想要的。 From there you can even checkout branches, reset them, view diffs, etc.从那里你甚至可以结帐分支,重置它们,查看差异等。

For something quicker, I would suggest对于更快的东西,我建议

git log --all --decorate --oneline --graph

This gets piped through less by default which gives you good navigation including search.默认情况下,这会通过less进行管道传输,从而为您提供包括搜索在内的良好导航。

Another option is just to install linux in a VM (virual box is free) and use tig .另一种选择是在 VM 中安装 linux(虚拟机是免费的)并使用tig You can ssh to the VM so you don't have to deal with the VM itself while using linux.您可以通过 ssh 连接到 VM,这样在使用 linux 时就不必处理 VM 本身。

GitExtensions is your best bet. GitExtensions是您最好的选择。

在此处输入图片说明

TortoiseGit is ok, though in it's attempt to "protect us from ourselves", they hide some of the native power of Git. TortoiseGit还可以,尽管它试图“保护我们免受自己的伤害”,但它们隐藏了 Git 的一些本机功能。 Fail.失败。

SeeGit is an interesting project from Phil Haack that helps visualize things. SeeGit是 Phil Haack 的一个有趣的项目,它有助于可视化事物。

在此处输入图片说明

The best tool is the command-line and a quick command like this is probably easiest and most powerful:最好的工具是命令行,像这样的快速命令可能是最简单和最强大的:

git log --oneline --graph --decorate --all

That pretty much would have to be TortoiseGit since you are already familiar with TortoiseHg.那几乎必须是TortoiseGit,因为您已经熟悉 TortoiseHg。 (Check All Branches ) (检查All Branches )

在此处输入图片说明

现在 VScode 有一个名为git-graph 的扩展,它最适合我的需要。

Depending on your push \\fetch \\ pull habits then you can either use the gitk viewer to see what you know locally (including the remotes you have fetched), or you can use the Network capability on Github to see what it has.根据您的push \\fetch \\ pull习惯,您可以使用gitk查看器查看您在本地知道的内容(包括您获取的遥控器),或者您可以使用 Github 上的Network功能查看它所拥有的内容。

Just select a multi-forked project (with not too many forks;-) and click on the network tab to see how all the other forks relate to it.只需选择一个多分叉项目(分叉不要太多;-)并单击网络选项卡以查看所有其他分叉与它的关系。

Some times you do need to switch fork to get the view point you want, but it's not too much hassle, and for a small team it looks ok.有时你确实需要切换叉子来获得你想要的观点,但这并不太麻烦,对于一个小团队来说看起来还可以。

I have made recent suggestions to Github about selectivity for forks (to down select when there are a lot of forks to display).我最近向 Github 提出了关于分叉选择性的建议(当有很多分叉要显示时向下选择)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 Windows 命令行在 Web 上打开当前的 GitHub 分支? - How can I open the current GitHub branch on Web using Windows command line? 如何将master合并到github中的Windows分支中? - how to merge master into branch in github for windows? 如何在Windows(7)命令提示符中导出命令的历史记录? - How I can export the history of my commands in Windows(7) Command Prompt? 如何从 windows 上的节点中的谷歌浏览器获取浏览器历史记录? - How can i get browser history from google chrome in node on windows? 如何在 Windows 的 GitHub Actions 中拥有两个 Windows 驱动器“C:”和“D:”? - How can I have two windows drives `C:` and `D:` within GitHub Actions in windows? Windows github工具-使用分支取消发布还是删除? - windows github tool - use branch unpublish or delete? Github在Windows上“无法发布此分支”错误 - Github “Failed to publish this branch” error on windows 如何轻松切换从Windows Git终端执行回购命令的GitHub用户? - How can I easily switch the GitHub user that's executing repo commands from the Windows Git terminal? 如何使用python读取Windows历史记录(文件夹)的内容? - How do I read the contents of Windows History (folder) using python? 如何获取Windows搜索历史记录? - How to get windows search history?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM