Move checkout head to Git class

Checkout head logic was incorrectly added to the Editor class instead of the Git class when the feature was originally added years ago.

This moves that logic into the Git class where it belongs.