Checkout gives the parameters for cloning the git repository,
ready to make changes. If not present, the `spec.ref` field from the
referenced `GitRepository` or its default will be used.
ref
object required
Reference gives a branch, tag or commit to clone from the Git
repository.
branch
string
Branch to check out, defaults to 'master' if no other field is defined.
commit
string
Commit SHA to check out, takes precedence over all reference fields.
This can be combined with Branch to shallow clone the branch, in which
the commit is expected to exist.
name
string
Name of the reference to check out; takes precedence over Branch, Tag and SemVer.
It must be a valid Git reference: https://git-scm.com/docs/git-check-ref-format#_description
Examples: "refs/heads/main", "refs/tags/v0.1.0", "refs/pull/420/head", "refs/merge-requests/1/head"
semver
string
SemVer tag expression to check out, takes precedence over Tag.
tag
string
Tag to check out, takes precedence over Branch.