This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
git [2014/09/02 17:50] – [Git Submodules] admin | git [2014/09/02 18:09] – [Create a Submodule] admin | ||
---|---|---|---|
Line 44: | Line 44: | ||
- | ====== Git Submodules ====== | + | ====== Git Submodules |
- | ===== Create a Submodule | + | ===== Create a Submodule ===== |
To link one repository into another in git you can use a thing called submodules: | To link one repository into another in git you can use a thing called submodules: | ||
Line 54: | Line 54: | ||
Example: | Example: | ||
+ | cd / | ||
git submodule add https:// | git submodule add https:// | ||
git add . | git add . | ||
Line 68: | Line 69: | ||
+ | ===== Update a submodules repo ===== | ||
+ | |||
+ | When updating a submodule its required to tell the parent repository to use the latest downloaded version. | ||
+ | |||
+ | cd / | ||
+ | git pull origin master | ||
+ | cd / | ||
+ | git commit -am " | ||
+ | git push origin |