Suppose you have a private git repository for your ambitious next-facebook project(A).
You find an awesome-but-need-modification github library(B) so you fork the repo.
How do you include the library(B) in your project git(A)?
as a submodule?
Suppose you have a private git repository for your ambitious next-facebook project(A).
You find an awesome-but-need-modification github library(B) so you fork the repo.
How do you include the library(B) in your project git(A)?
as a submodule?
You can use submodule if you want a source dependency between the two projects.
Your project will reference a fixed SHA1 of libraryB
, but you can configure a submodule to follow a branch: see "Git submodules: Specify a branch/tag".
In that case:
cd /path/to/next-facebook
git submodule add https://url/to/libraryB
git submodule update --init
This is different from subtree, where the history of libraryB would be part of your own project.