1. git-vendor(1)
  2. Git Vendor
  3. git-vendor(1)


git-vendor - manage vendored dependency subtrees


git-vendor add [--prefix <dir>] <name> <repository> [<ref>]

git-vendor list [<name>]

git-vendor update <name> [<ref>]


Manage any repository dependencies with git-subtree.

git-vendor follows the same vendoring pattern that is used in the Go community. Dependencies are stored under vendor/<repository_uri>. For example, the dependency of https://github.com/brettlangdon/forge.git will be stored under vendor/github.com/brettlangdon/forge by default.

git-vendor is unable to list or update any dependencies it has not added, the reason is that git-vendor adds special commit messages so that it can track existing dependencies.


add [--prefix <dir>] <name> <repository> [<ref>]

Add a new vendored dependency

list [name]

List all existing vendored dependencies and their current version. Limit show dependency to <name> if provided.

update <dir> <ref>

Update the vendored dependency to a different version


--prefix <dir>

Directory to pull dependencies in under (e.g. vendor or third_party, etc). [default: vendor]


A name to provide the vendored dependency to use when listing/updating.


The repository url to vendor. e.g. https://github.com/<username>/<repo-name> (supports http://, https:// git:// and git@ protocols).


The ref to vendor. e.g. master, v1.0.2, etc. [default: master]


Adding a new dependency at a specific git tagged version:

$ git vendor add forge https://github.com/brettlangdon/forge v0.1.4

Adding a new dependency under a different directory than vendor/:

$ git vendor add --prefix third_party forge https://github.com/brettlangdon/forge

Updating an existing dependency to a specific git tagged version:

$ git vendor update forge  v0.1.7

Updating a dependency to master:

$ git vendor update forge

List all existing dependencies:

$ git vendor list


Written by Brett Langdon me@brett.is





  1. January 2016
  2. git-vendor(1)