We've lost the holy grail! Save it!
- Run
. setup.sh(or.\setup.ps1in PowerShell)
We just reset our commits. Try different ways to restore them.
- Using cherry-pick, restore the most important commit that was lost.
- Using reset, undo the reset (Google "How to undo git reset").
- Remove the
exercisefolder. - Run
. setup.sh(or.\setup.ps1in PowerShell) - Run
git gc - Can you still save the lost commit? Why? (Google "git reflog default expiration").
- For extra credit what if someone reset their branch, force pushed and you pulled? Can you restore the old state?
git refloggit cherry-pickgit reset --hard