13
submitted 1 year ago by [email protected] to c/[email protected]

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.

top 8 comments
sorted by: hot top controversial new old
[-] [email protected] 12 points 1 year ago

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.

[-] [email protected] 6 points 1 year ago

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

[-] [email protected] 1 points 1 year ago* (last edited 1 year ago)

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

[-] [email protected] 1 points 1 year ago

Haven’t heard of, will check out! Thanks.

[-] [email protected] 1 points 1 year ago

great, thanks a ton!

[-] [email protected] 9 points 1 year ago
[-] [email protected] 2 points 1 year ago* (last edited 1 year ago)

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

load more comments
view more: next ›
this post was submitted on 19 Jul 2023
13 points (100.0% liked)

Git

2632 readers
24 users here now

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Resources

Rules

  1. Follow programming.dev rules
  2. Be excellent to each other, no hostility towards users for any reason
  3. No spam of tools/companies/advertisements. It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.

Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.

founded 1 year ago
MODERATORS