Question

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?

Was it helpful?

Solution

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

    git log -p --reverse [hash from above command]..my-branch
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top