0 votes
21 views

How will you find out what all files have been changed in a particular Git commit?

in Technology by (191k points)

1 Answer

0 votes

 By using the hash value of the particular commit, you can execute the below command to get the list of files that have been changed in a particular commit:

git diff-tree -r {hash}

This will list down all the files that have been modified, and also the files that have been added. The -r flag is used to list individual files along with their path instead of collapsing them in their root directory names only.

You can also use the below command:

git diff-tree –no-commit-id –name-only -r {hash}

–no-commit-id will retrain the commit hash numbers to come in the output. Whereas, -name will exclude the file paths and only give the file names in the output.

by (191k points)

Related questions

0 votes
1 answer 93 views
0 votes
1 answer 24 views
24 views asked Jan 8 in Technology by JackTerrance (191k points)
0 votes
1 answer 27 views
0 votes
1 answer 40 views
40 views asked Nov 4, 2020 in Technology by JackTerrance (191k points)
0 votes
1 answer 23 views
0 votes
1 answer 37 views
37 views asked Jan 8 in Technology by JackTerrance (191k points)
0 votes
1 answer 35 views
0 votes
1 answer 23 views
0 votes
1 answer 29 views
0 votes
1 answer 32 views
0 votes
1 answer 20 views
20 views asked Jan 7 in Technology by JackTerrance (191k points)
0 votes
1 answer 24 views
0 votes
1 answer 22 views
0 votes
1 answer 47 views
0 votes
0 answers 25 views
0 votes
1 answer 14 views
14 views asked Nov 4, 2020 in Technology by JackTerrance (191k points)
0 votes
1 answer 23 views
23 views asked Jan 7 in Technology by JackTerrance (191k points)
0 votes
1 answer 29 views
0 votes
1 answer 22 views
0 votes
1 answer 17 views
17 views asked Jan 7 in Technology by JackTerrance (191k points)
0 votes
1 answer 20 views
20 views asked Nov 4, 2020 in Technology by JackTerrance (191k points)
...