Use git submodules to share files between multiple git repositories

In this series, I show how to use submodules in git to share files between multiple git repositories.

First, let’s setup the DemoSubModule and the DemoModule repositories.

Setup the DemoSubModule repository

Create the DemoSubModule repository then clone it locally. Now, enter in the project directory:

cd DemoSubModule

Initialize the directory:

git init

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store