I have a linear commit history. I want to use git for presentations.
Go to the previous commit:
$ git checkout HEAD~1
Go to the next commit:
$ git log --reverse --pretty=%H | grep -A 1 $(git rev-parse HEAD) | tail -n1 | xargs git checkout
Here, --reverse
output the commits chosen to be shown in reverse order.
e.g. git log -10 --reverse
would get last 10 commits then reverse it.