Combine git rev-list with git show

781 views Asked by At

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?

1

There are 1 answers

0
Wolf On BEST ANSWER

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

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