igniteflow
igniteflow

Reputation: 9802

Combine git rev-list with git show

Currently to review commits made on a branch I do the following:

git merge-base HEAD master  # to get the hash of when the branch came off parent
git show [hash from above command]..my-branch

However, this lists the commits in reverse chronological order. I would like to review the commits starting with the first and ending with most recent. To get the commit hashes in this order one can use

git rev-list [hash from above command]..my-branch

but could anyone tell me how I can pass this to show or difftool?

Upvotes: 0

Views: 792

Answers (1)

Wolf
Wolf

Reputation: 4462

I think what you want is actually available directly from git log

    git log -p --reverse [hash from above command]..my-branch

Upvotes: 2

Related Questions