Git 日志图在 IntelliJ 和 VSCode 中有所不同 [英] Git log graph differs in IntelliJ and VSCode

查看:49
本文介绍了Git 日志图在 IntelliJ 和 VSCode 中有所不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是同一个仓库同一个分支(master_mt)的截图.
如果我们考虑 Merge branch 'hotfix-v3.0.3' into master_mt 提交,我们看到,
VS 代码片段显示正确分支上的提交(即蓝色).
但是 IntelliJ 没有正确显示它,理想情况下,它应该在洋红色线上显示相同的内容.

Below are the snips of the same repository and same branch (master_mt).
If we consider Merge branch 'hotfix-v3.0.3' into master_mt commit, we see,
VS code snip shows the commit on the correct branch (ie blue color).
But IntelliJ doesn't show it correctly, ideally, it should show the same on the magenta line.

在 IntelliJ 上阅读图表时我遗漏了什么吗?

Is there anything I am missing while reading the graph on IntelliJ?

推荐答案

但是 IntelliJ 没有正确显示,

But IntelliJ doesn't show it correctly,

是的.

在 IntelliJ 上阅读图表时我遗漏了什么吗?

Is there anything I am missing while reading the graph on IntelliJ?

是的.基本上,您不知道如何阅读地图.至少,这种地图.

Yes. Basically, you don’t know how to read a map. At least, this kind of map.

还记得那个老笑话吗?在拓扑上,甜甜圈和咖啡杯是同一个对象.这里也是一样.

Remember the old joke? Topologically, a donut and a coffee cup are the same object. The same is true here.

Git 历史描述了节点父系的有向无环图.如果您仔细观察,您会发现在此基础上,您的两个屏幕截图是绘制完全相同图形的两种完全有效的方式.它们传达完全相同的节点父系信息.这就是要传达的全部内容.

Git history describes a directed acyclic graph of node parentage. If you look carefully you will see that on that basis your two screenshots are two perfectly valid ways of drawing the very same graph. They convey exactly the same node parentage information. And that is all that there is to convey.

换句话说,这两张图在拓扑上是相同的.一点弯曲和拉伸将一个变成另一个,而指示的节点父系没有任何变化.下面是这幅画的内容 - 两个屏幕截图(从下往上阅读):

The two drawings are, in other words, topologically identical. A little bending and stretching turns one into the other without any change in the node parentage indicated. Here is what the drawing says — in both screen shots (reading from the bottom up):

  • 当我们从底部进入图片时,单一的出身链代表 master 和 dev.我猜你认为这是大师.

  • As we enter the picture from the bottom, a single chain of parentage represents both master and dev. I presume that you think of this as master.

在同一分支上,发布 6020.

On that same branch, Release 6020.

在同一个分支上,发布 3145.

On that same branch, Release 3145.

然后创建了一个修补程序分支,并且修复应用程序崩溃问题"出现了.在其上创建了 commit,然后是 Release 3146.这可能是您感到困惑的地方.在从右到左的术语中,这行血统水平显示在第一个屏幕截图的最右侧和第二个屏幕截图的中间 - 但这无关紧要,因为分支的从右到左(水平)位置具有没有任何意义.它仍然是相同的图表,垂直显示相同的亲子关系链.

Then a hotfix branch was created and the "Fix app crash issue" commit was created on it, followed by Release 3146. This is probably where you are confused. In right-to-left terms, this line of parentage is horizontally displayed at the far right in the first screenshot and in the middle in the second screenshot — but that is irrelevant because right-to-left (horizontal) position of a branch has no meaning whatever. It's still the same graph showing the same chain of parentage vertically.

hotfix 分支随后合并到 master 中,也单独合并到 dev 中.因此我们需要显示三个减少到两个的分支,因为 hotfix 分支现在已经合并到另外两个分支中,不会有进一步的开发.这两个分支在第一个屏幕截图中以从右到左的顺序 master-dev 显示,在第二个屏幕截图中以 dev-master 的顺序显示,但正如我刚才所说的那样,这是没有意义的.它仍然相同的图表!

The hotfix branch was then merged into master and also merged separately into dev. Thus we need to display three branches which are reduced to two, because the hotfix branch has now been merged into the other two and there will be no further development on it. The two branches are displayed in the right-to-left order master–dev in the first screenshot and in the order dev–master in the second screenshot, but as I just remarked, that's meaningless. It's still the same graph!

现在仅在 dev 上继续开发:等待未来、次要重构等.master 上也有进一步的开发,但是在截图上面,没有显示.

Development now continues just on dev: Await future(s), Minor refactor, and so forth. There is also further development on master but it is above the screenshots and is not shown.

所以别担心,开心就好.这两个屏幕截图显示了相同的内容并且都是正确的.

So don’t worry, be happy. The two screenshots show the same thing and are both correct.

这篇关于Git 日志图在 IntelliJ 和 VSCode 中有所不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆