如何在不提交中间的情况下查看两次提交之间的更改? [英] How to see the changes between two commits without commits in-between?

查看:112
本文介绍了如何在不提交中间的情况下查看两次提交之间的更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你如何使 git diff 仅显示两个提交之间的差异,排除其他提交之间的差异?


$ b

   - 您可以简单地将2个提交传递给git diff。 > git diff 0da94be 59ff30c> my.patch 
- > git apply my.patch


How do you make git diff only show the difference between two commits, excluding the other commits in-between?

解决方案

you can simply pass the 2 commits to git diff like :

-> git diff 0da94be  59ff30c > my.patch
-> git apply my.patch

这篇关于如何在不提交中间的情况下查看两次提交之间的更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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