Reputation: 836
I know I can use the following command to get commit history starting from this specific commit to the first commit in history (going backwards).
git log --pretty=format:"%h - %an, %ar : %s" "de37b49d8f06321275079e6b3a3f00aa22bbff99"
However, how to reverse this to display history starting from this specific commit -including it- up to the last commit in history (going upwards)?
Thanks
Upvotes: 0
Views: 52
Reputation: 14823
Presuming de37b49 isn't a merge commit you would do
git log --pretty=format:"%h - %an, %ar : %s" de37b49~1..HEAD
which is saying "NOT reachable by parent of de37b49" but "reachable by HEAD"
If that is a merge commit, then you would need to use
git log ... ^de37b49^1 ^de37b49^2 HEAD
(for as many parents it has, presuming 2)
Upvotes: 1