View Git Commit Changes
In order to see changes in a commit, we can make use of either git diff
or git show
commands. Below are examples to illustrate their usage -
Check Changes with git show
git show
The git show
command show the changes introduced in a specific commit. To use it, specify the commit hash:
Check Changes with git diff
git diff
The git diff
command allows us to compare changes between commits or with the working directory.
Compare the last commit:
Compare two specific commits:
Show changes between the working directory & the last commit:
Source: StackOverFlow
Last updated