如何比较git中两个分支之间的单个文件上的提交差异?

发布于 2025-02-03 07:57:23 字数 340 浏览 2 评论 0原文

一个分支和B分支都具有a,b,c,d的委托,并且在b,c consits中,文件xxx.java已更改。

但是一个分支具有E,F,G,H consits,并且在F,H consits中,文件xxx.java已更改。

命令

F -- F commit id(for example, 1fd3bb10d0d8b63c20cf0b2aa0c6f92812cb7b7f)
H -- H commit id

吗 )

,想法有这种情况的视觉工具吗?

多谢。

A branch and B branch both have A, B, C, D commits and in B, C commits, file xxx.java is changed.

but A branch has E,F,G,H commits and in F, H commits, file xxx.java is changed.

Is there a command, after

$git command xxx.java branchA branchB

I can get:

F -- F commit id(for example, 1fd3bb10d0d8b63c20cf0b2aa0c6f92812cb7b7f)
H -- H commit id

( I don't need the difference in the specific content of the file, it's something that interferes and wants to be deleted )

And does IDEA have a visual tool for this situation?

Thanks a lot.

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

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

发布评论

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

评论(1

冬天旳寂寞 2025-02-10 07:57:23

看来您只需要在所有分支机构上的特定文件历史记录。 Intellij可以为您展示 - 致电Git |在文件上显示历史记录,然后在工具栏上启用显示所有分支。

It seems you just need a history of specific files across all branches. IntelliJ can show it for you - call Git | Show History on a file, and then enable the Show All Branches on the toolbar.
enter image description here

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