I have recently moved from SVN to Git and am a bit confused about something. I needed to run the previous version of a script through a debugger, so I did git checkout <
I am just beginning to dig deeper into git, so not sure if I understand correctly, but I think the correct answer to the OP's question is that you can run git log --all
with a format specification like this: git log --all --pretty=format:'%h: %s %d'
. This marks the current checked out version as (HEAD)
and you can just grab the next one from the list.
BTW, add an alias like this to your .gitconfig
with a slightly better format and you can run git hist --all
:
hist = log --pretty=format:\"%h %ai | %s%d [%an]\" --graph
Regarding the relative versions, I found this post, but it only talks about older versions, there is probably nothing to refer to the newer versions.