Skip to content

How-to / Examples

Task-oriented recipes. Each assumes you already know what v is — see the Quickstart otherwise.

Vendor to a custom path

v add https://github.com/example/repo main -d third_party/repo

By default a repository is placed at vendor/<host>/<path>. Use -d / --destination to override.

Vendor at an exact commit

v add https://github.com/example/repo abc123def456...

Switch a vendored repo to a different branch

v update https://github.com/example/repo other-branch

Update every vendored repository at once

v update

Updates all entries in vendors.toml to the latest commit on their current ref.

Commit vendors.toml to source control

git add vendors.toml
git commit -m "Vendor example/repo"

Always track vendors.toml in version control — it is the manifest that makes a vendored tree reproducible. Committing the vendor/ directory itself is optional (see the vendors.toml reference), but the manifest should always be committed.

Placeholder

Add new recipes here as common workflows emerge.