Try to do the right thing if we aren't in a git checkout.