I have seen git commands use a syntax such as HEAD~, but I haven\'t been able to find this syntax in the Git Reference Manual.
HEAD~
Here is what I have under
To simply answer the question from title (since that's what got me here from Google):
To checkout the previous commit:
git checkout HEAD^
To checkout the next commit (assuming there's no branching):
git checkout `git log --reverse --ancestry-path HEAD..master | head -n 1 | cut -d \ -f 2`