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

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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.