Git reset --hard instead of checkout.

It seems like this is the recommendation of general wisdom, and I
suppose it might save me some confusion in the future.