Say I have a git log
that looks like this:
commit 8379fef8952c9fde4c4f8bb9b3fb5dab80a61bc9
...
commit cc6c393f707da82aa3f0753db81b148d7eddaaf1
...
commit 6668e9087e3561b7797c91730f4ac0057fa85904
...
commit 2da2d26974d1ef57a02f3dfe2c7b5aa310f2efac
...
commit a625c16a2985d06f10fb72db9e6952fdf51e5000
...
Say I want to revert back to the bottom one a625c16...
and that all the work above it is terrible. I basically want to blow away everything I did in the last 4 commits and restart from the bottom commit. When I checkout that commit, I'm on no branch
and a detached HEAD state. What does that mean? What needs to be done so I can continue working on this branch but from 4 commits ago?