git-show

How to list only the file names that changed between two commits?

断了今生、忘了曾经 提交于 2019-11-26 00:29:23
问题 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? 回答1: git diff --name-only SHA1 SHA2 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). 回答2: git diff --name-status [SHA1 [SHA2]] is like --name-only, except you get a simple

How to list all the files in a commit?

戏子无情 提交于 2019-11-25 22:05:10
问题 I am looking for a simple git command that provides a nicely formatted list of all files that were part of the commit given by a hash (SHA1), with no extraneous information. I have tried: git show a303aa90779efdd2f6b9d90693e2cbbbe4613c1d Although it lists the files, it also includes unwanted diff information for each. Is there another git command that will provide just the list I want, so that I can avoid parsing it from the git show output? 回答1: Preferred Way (because it's a plumbing command