- I own a GitHub repository, A.
- Repository B is another open-source project, which is owned by someone else.
- Repository A depends on repository B (repository B is a submodule of A).
If the owner of repository B decides to delete that repository, users will not be able to successfully clone/checkout/build my repository anymore.
Should I preemptively fork B to use as a backup in case the owner decides to delete it? Is this considered a dangerous situation to be in, or how is it usually handled for open-sourced projects?
Best Answer
If the dependent code "repo B" vanishes:
Yes.
Yes, this is a dangerous situation to be in depending on the popularity/distribution/mirrors of the dependent repo and how important your repo is to you. If it is important to others, they (hopefully) already have a backup of both your repo and the dep repo.
Note that you can fork it on GitHub to your account and not clone it to your SSD to not take up space. Also, keep in mind that that backup option is dependent on nothing happening to GitHub's servers or your account not being compromised; only you can determine the degree of redundancy which is adequate.
Consider the quantity of code you are relying on, its popularity, the difficulty to reproduce it, and the cost to store it reliably. After considering that risk assessment, back it up accordingly.
Since cost seems to be a factor in your situation given you don't want to spend more for a larger SSD, here is a list of cheap backup options: