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

1 Answer

0 votes
by

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.

Click here to read more about GIT
Click here to read more about Insurance

Related questions

0 votes
asked May 21, 2020 in Git by SakshiSharma
0 votes
asked Oct 15, 2019 in Git by rajeshsharma
+2 votes
asked Jan 15, 2020 in Agile by Robindeniel
0 votes
asked Apr 18, 2020 in Git Slack Integration by SakshiSharma
0 votes
asked Jun 8, 2020 in Git by DavidAnderson
...