List files modified for particular git commit [duplicate]

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 02:10:33

问题


I have commit, abc, and I want to list files that were modified for the commit.

What is the git command which will list modified files for that commit?


回答1:


For filenames only:

git show --name-only abc

To see a summary of what happened to them:

git show --name-status abc



回答2:


You can see the files changed in a particular commit as follows

git show --stat <commit-hash>

Alternatively you can also view the patch introduced with each commit using the -p flag

git log -p <commit-hash>

BTW git show takes the same formatting arguments as git diff-tree, here's the documentation for diff-tree.



来源:https://stackoverflow.com/questions/21515084/list-files-modified-for-particular-git-commit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!