How to add Github repo inside another

Happy Sunday, here is the idea for today. Suppose we have a large project which will be spread across  repositories and want to show them all in a repo along with new repository content. Literally we need to link other repository or as submodule.

How do we do this ?

We can use the submodule for this with have three step approach .

  1. Get the link of the repo
  2. Add it to the current repo (add module)
  3. Fire git commands init and update

Run the following command on console for add the repo as submodule.

git submodule add <url of the repo> 
git submodule init
git submodule update

Here is my example .

You also like the following ideas too

Published by


A developer,teacher and a blogger obsessed with Python,Dart and open source world from India

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.