Underd0g
Underd0g

Reputation: 57

What is the best method to keep third party repositories up to date in my own github repository?

I don't have much experience with github.

I'm trying to create my own repository as a compilation that contains some of my own tools and also tools from other third-party repositories.

It is essential that if the authors make updates in their repositories, I can every X time make a pull of all the third-party repositories to have the latest version.

I also need that when my repository is cloned by a user X, both my tools and third-party tools are downloaded locally.

I don't need to make any modifications to the third-party repositories, just update to their latest versions.

I have tried submodules but third party content is not cloned locally when my repository is called.

I have seen that subtrees exist but I know if it will be possible to update all subtrees easily.

Is there a suitable method for this?

Thanks a lot

Upvotes: 1

Views: 350

Answers (1)

VonC
VonC

Reputation: 1324178

I have tried submodules but third party content is not cloned locally when my repository is called

Submodules should be cloned, provided you use a git clone --recurse-submodules:

git clone --recurse-submodules https://github.com/<me>/<myRepo>

After the clone is created, initialize and clone submodules within based on the provided pathspec.
If no pathspec is provided, all submodules are initialized and cloned.

Upvotes: 2

Related Questions