Sunday, December 11, 2011

Viewing single commit diff in Git

Reference: Viewing single commit diff in Git


I have started using Git for my projects and am very impressed by it. More about it in later post.

In the mean time, I just want to share about how to view a diff of single commit.

In SVN, this is what I usually do:

svn diff -c ARG



I didn't know the equivalent of it in Git and I used to do this, which is a pain:

git diff [commit]^ [commit]



That is, until I found out about:

git show [commit]



Problem solved.

No comments: