From 96bb24850a9950a0b49ad0e9e33bb5e66bd72ab9 Mon Sep 17 00:00:00 2001 From: adamwday Date: Sat, 2 Sep 2017 17:12:09 -0600 Subject: [PATCH] Adding instructions to add and remove submodules. --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index f4fe7da..71d9b1d 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,20 @@ $ git add $ git add README $ git commit -m 'Initial project version' ``` +#### Adding a submodule + + Submodules allow you to keep a Git repository as a subdirectory of another Git repository. This lets you clone another repository into your project and keep your commits separate. + +```sh + $ git submodule add https://github.com/user/repo.git +``` + +#### Removing a submodule + +```sh +$ git submodule deinit -f submodule_name +``` + #### Checking the status of your files The main tool you use to determine which files are in which state is the `$ git status` command. If you run this command directly after a clone, you should see something like this: