DEV Community

Discussion on: 8 underrated git commands every programmer should know (not the usual pull, push, add, commit)

Collapse
 
dentych profile image
Dennis • Edited

You can do HEAD^^^^^ to go back 5 commits, so in reality it's the same. I find it easier to write ^, but it's really up to personal preference :)

5 works fine post-rebase. git reflog can be very confusing for newbies, because it shows a log of where the HEAD has moved, and not just a (probably) fairly linear commit history.