如何比较 Git 中一个分支的 HEAD 提交与另一分支的 HEAD 提交?
我有 2 个本地分支,branch1 和 newer_branch1。
branch1 将 commit#1 作为 HEAD 提交,newer_branch1 也是如此,但我不知道branch1 是否实际上与 newer_branch1 是最新的,因为 newer_branch1 具有最新版本的提交。它们还具有完全相同的提交消息,因此我不能简单地根据提交文本判断它们是不同的提交版本。
我尝试仅使用 git diff ID#X..ID#Y 查看 HEAD 提交差异(其中 ID#X 是 newer_branch1 HEAD 提交的 SHA ID#,ID#Y 是 SHA ID) # of Branch1) 但我看到 git 日志中的较旧提交被 diff'd 代替。
我该怎么做?谢谢。
I have 2 local branches, branch1 and newer_branch1.
branch1 has commit#1 as the HEAD commit and so does newer_branch1, but I don't know if branch1 is actually up to date with newer_branch1, as newer_branch1 has the most recent version of the commit. They also have the same exact commit messages so I can't simply tell they're different commit versions based on commit text.
I tried to view only the HEAD commit diffs with git diff ID#X..ID#Y
(where ID#X is the SHA ID# of newer_branch1 HEAD commit, and ID#Y is the SHA ID# of branch1) but I am seeing older commits from the git log being diff'd instead.
How can I do this? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论