How do I find the next commit in Git? (child/children of ref)

To list all the commits, starting from the current one, and then its child, and so on – basically standard git log, but going the other way in time, use something like

git log --reverse --ancestry-path 894e8b4e93d8f3^..master

where 894e8b4e93d8f3 is the first commit you want to show.

Leave a Comment