From 553288a384002631434505a76b732826318ca2b9 Mon Sep 17 00:00:00 2001 From: Richard K Miller Date: Thu, 28 Aug 2014 21:49:57 -0600 Subject: [PATCH 1/2] Very tiny but necessary edit To delete `.git` repos of submodules, `rm -rf vendor/**/.git` doesn't work, but `rm -rf vendor/*/*/.git` does --- .../should-i-commit-the-dependencies-in-my-vendor-directory.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md b/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md index 8e50f7264..ed128c88a 100644 --- a/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md +++ b/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md @@ -23,7 +23,7 @@ If you really feel like you must do this, you have a few options: 2. Use --prefer-dist or set `preferred-install` to `dist` in your [config](../04-schema.md#config). 3. Remove the `.git` directory of every dependency after the installation, then - you can add them to your git repo. You can do that with `rm -rf vendor/**/.git` + you can add them to your git repo. You can do that with `rm -rf vendor/*/*/.git` but this means you will have to delete those dependencies from disk before running composer update. 4. Add a .gitignore rule (`vendor/.git`) to ignore all the vendor `.git` folders. From 1ee0f28e79c2327c15b1df42631b895d908afad5 Mon Sep 17 00:00:00 2001 From: Richard K Miller Date: Fri, 29 Aug 2014 13:50:25 -0600 Subject: [PATCH 2/2] update documentation to work for ZSH or Bash --- .../should-i-commit-the-dependencies-in-my-vendor-directory.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md b/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md index ed128c88a..cdbd3141c 100644 --- a/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md +++ b/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md @@ -23,7 +23,8 @@ If you really feel like you must do this, you have a few options: 2. Use --prefer-dist or set `preferred-install` to `dist` in your [config](../04-schema.md#config). 3. Remove the `.git` directory of every dependency after the installation, then - you can add them to your git repo. You can do that with `rm -rf vendor/*/*/.git` + you can add them to your git repo. You can do that with `rm -rf vendor/**/.git` + in ZSH or `find vendor/ -type d -name ".git" -exec rm -rf {} \;` in Bash. but this means you will have to delete those dependencies from disk before running composer update. 4. Add a .gitignore rule (`vendor/.git`) to ignore all the vendor `.git` folders.