From 8a691814e29842723af763eca461ea73867662e1 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Fri, 15 Jan 2016 16:17:07 +0000 Subject: [PATCH] Document vendored dependency management commands --- vendor/README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 vendor/README.md diff --git a/vendor/README.md b/vendor/README.md new file mode 100644 index 00000000..fb866903 --- /dev/null +++ b/vendor/README.md @@ -0,0 +1,26 @@ + +# Managing Vendored Dependencies with `git submodule` + +These operations result in staged but uncommitted changes to your +branch; you will need to commit them as normal. Execute them in the +root of your checkout. + +## Adding a New Dependency + + ~/weave$ git submodule add https://example.com/organisation/module vendor/example.com/organisation/module + +## Update All Dependencies to Upstream `master` + + ~/weave$ git submodule foreach git pull origin master + +## Force a Specific Dependency to a Particular Commit + + ~/weave$ (cd vendor/example.com/organisation/module && git checkout ) + ~/weave$ git add vendor/example.com/organisation/module + +## Remove a Dependency + + ~/weave$ git submodule deinit vendor/example.com/organisation/module + ~/weave$ git rm vendor/example.com/organisation/module + ~/weave$ rm -rf .git/modules/vendor/example.con/organisation/module +