FAQ

git reflog # you will see a list of every thing you've done in git, across all branches! # each one has an index HEAD@{index} # find the one before you broke everything git reset HEAD@{index} # magic time machine

# make your change git add . # or add individual files git commit --amend # follow prompts to change or keep the commit message # now your last commit contains that change!

git commit --amend # follow prompts to change the commit message