Add docs on how to remove a submodule
[opnfvdocs.git] / docs / how-to-use-docs / include-documentation.rst
index 0bc3264..d1a5a62 100644 (file)
@@ -236,8 +236,19 @@ Clone the opnfvdocs repository and your submodule to .gitmodules following the c
 .. code-block:: bash
 
   cd docs/submodules/
-  git submodule git https://gerrit.opnfv.org/gerrit/$reponame
+  git submodule add https://gerrit.opnfv.org/gerrit/$reponame
   git submodule init $reponame/
   git submodule update $reponame/
   git add .
+  git commit -sv
   git review
+
+Removing a project repository as a submodule
+--------------------------
+  git rm docs/submodules/$reponame
+  rm -rf .git/modules/$reponame
+  git config -f .git/config --remove-section submodule.$reponame 2> /dev/null
+  git add .
+  git commit -sv
+  git review
+