Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on feddit.de

What's to best way to integrate another repo into my own and keep it updated.

Hi, I'm writing a script that incorporates some functionality from another script. The other script is developed and maintained by someone else, hosted on github and released under the MIT license. What is the best way to incorporate that other repo into my own with an easy way to keep it updated when the other developer releases a new version. I don't really intend to contribute to the other repo, just use their code.

View original on feddit.de
13

7 replies

lemmy.world

Submodules is the way to go, but really it's always a good idea to use tagged releases or commit id's for code from upstream as they might implement a breaking change at some point, taking Your project down with it.

13
jonatan83reply
lemmy.fmhy.ml

It’s probably also good to link to a fork of the repo in question, in case the original disappears.

6
madwifireply
lemmy.world

take a look at subtree, it incorporates the history of the upstream repository into your repository easily and if the upstream vanishes one day, you would still have a full repo history of upstream

2

Couple of others have suggested to Submodules. git subtree is another alternative. Personally, I felt subtree much more easier to use.

2

You reached the end

What's to best way to integrate another repo into my own and keep it updated. | Spyke