git – Show/diff parents of a merge commit

git cat-file -p <commit>

or

git show --pretty=raw <commit>

Both these show similar information: the committer, the parent(s), commit text and so on.

Now that you have the two parents of a merged request (see above tip), you can see all files changed between its two parents with a command like this:

git diff --name-only <sha1> <sha2>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s