only reset repo if it matches the remote and checkout_branch