Ensure that the latest tags are fetched before attempting to checkout the specified branch or tag.