Visualize - Git

https://learngitbranching.js.org/

This is the best site I have ever come across to learn git.

detach head (pointer on a commit)
git checkout commit_hash
relative refs '^' and '~num'
moving up with one commit '^'
moving upward number of times with '~num'

Relative refs and branch forcing
Forces a branch to move backward using relative refs
(moving a branch to a location)
git branch -f main HEAD~4
git branch -f main commit_hash

Write a comment ...