0 votes
1 view
in Devops and Agile by (25.5k points)

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.

Which command should I use?

1 Answer

0 votes
by (42.6k points)

The command that you can use to see the file names that changed between two commits according to the question is

git diff --name-only SHA1 SHA2

Also, you can use to see the difference between any latest commands using 

git diff --name-only HEAD~10 HEAD~5

Here this command will help you to see the file names between tenth latest commit and fifth latest commit.

And also you can use git show command for having the file name of SHA1 and SHA2 separately using 

 git show --name-only SHA1

git show --name-only SHA2

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...