git provider fails on existing branch names

We have a case where our devs use the <code>develop</code> branch as the default branch on a project, which causes this checkout to break unless the <code>checkout_branch</code> is changed. This patch makes it so that if the <code>checkout_branch</code> already exists from the clone, the checkout will reset to the revision given (which does nothing if given <code>HEAD</code> that already points to this branch).