Cpo Design

Git Submodules in VSTS

Pavel Svarc Monday, January 15, 2018 2:17 AM

Git submodules is a way how to split the repository into logical segments.

Basic

Git configuration is stored in root of the application in file ".gitmodules"

 

How do I get documentation that is compatible with my git?

git submodule --help

Create submodule

git submodule add -b master https://Subscription.visualstudio.com/PathToGitRepository SubDirectory

Remove submodule

Everyone makes mistake and therefore here is how you can remove the submodule

git submodule deinit -f SubDirectory

Pointers

  1. When creating directory make sure you are in correct directory as the path will be applied from the directory you are executing from