Hi! I'd like to incorporate an existing project (hosted on GitHub) as a part of my project (into a subdirectory) while maintaining the history and the ability to update that project. I've found that there can be about three approaches:
- Fork the original project, move the original contents into a subdirectory and push it to my GitHub repo.
- Init a new repo, do a subtree merge with the existing repo and push to my GitHub repo.
- Clone the existing repo, make a new main repo, put the cloned repo into the main one as a submodule, push.
The (1) variant could be the preferable one at GitHub as they can probably share the sources. But logically my project is not a fork of the existing one. Rather the existing one is just a module. Also I'm not sure if moving the existing code into a subdirectory might not make problems. I would probably prefer the (2) variant as there is only one repo. (3) would require working with several repos but logically is the closest to my situation.
I have researched this quite a bit, but I'm not definitely sure. What would you recommend in this situation? Thank you in advance!