I have a few commits and I need to fix my previous commit so I did.
git rebase -i HEAD~2
# change the commit's pick to edit
# ....
How to change the HEAD back to my latest commit?
I have a few commits and I need to fix my previous commit so I did.
git rebase -i HEAD~2
# change the commit's pick to edit
# ....
How to change the HEAD back to my latest commit?
After editing a commit in rebase you need to continue the rebase
git rebase --continue
This will finish the rebase and get you back to commit you were on (well, the rebased version of it)