pub fn checkout(repo: &Repo) -> Result<(), Error>
Checkout a branch and make sure it is up to date. The checkout is shallow and only the needed branch is fetched.