如何仅列出在两次提交之间更改的文件名? [英] How to list only the file names that changed between two commits?
本文介绍了如何仅列出在两次提交之间更改的文件名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在回购中有一堆提交。我希望看到在两次提交之间更改的文件列表 - 从SHA1到SHA2。
I have a bunch of commits in the repo. I want to see a list of files changed between two commits - from SHA1 to SHA2.
我应该使用什么命令?
What command should I use?
推荐答案
git diff --name-only SHA1 SHA2
您只需要包含足够的SHA即可识别提交。你也可以这样做,例如
where you only need to include enough of the SHA to identify the commits. You can also do, for example
git diff --name-only HEAD~10 HEAD~5
查看第十次最新提交与第五次最新提交(左右)之间的差异。
to see the differences between the tenth latest commit and the fifth latest (or so).
这篇关于如何仅列出在两次提交之间更改的文件名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文