We've lost the holy grail! Save it!
- Run
. setup.sh
(or.\setup.ps1
in PowerShell)
- Save the most important commit that was lost
- What's the difference between saving using reset and using cherry-pick?
- Remove the
exercise
folder. - Run
. setup.sh
(or.\setup.ps1
in PowerShell) - Run
git gc
- Can you still save the lost commit?
- For extra credit what if someone reset their branch, force pushed and you pulled? Can you restore the old state?
git reflog
git cherry-pick
git reset --hard