Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in DevOps and Agile by (29.3k points)

Aside from writing an alias or script, is there a shorter command for getting the diff for a particular commit?

git diff 15dc8^..15dc8

If you only give the single commit id git diff 15dc8, it diffs that commit against HEAD.

1 Answer

0 votes
by (50.2k points)

For this question, Use

 git show $COMMIT

 This will show you the log message for the commit, and the diff of that particular commit.

Refer: https://git-scm.com/docs/git-show

Browse Categories

...