3 AddSubmoduleToGitRepo
Erik edited this page 2024-05-01 14:07:47 +02:00

How to add submodules to a gitrepo

If you want to use another git repo within your repo but still get updates from or contribute to the upstream repo without breaking things, then you need to add the repo as a submodule. This tells git that this folder is another repo and it will add a link to it instead.

Step1: go to your repo. Use the following command instead of pull:

 git submodule add <link to repo> <path (if no path is provided the current folder is used.)>