I am looking to write a new open source library (at github.com/me/my_lib, say). Rather than starting from scratch I would like to begin with a copy of the code from an existing project (github.com/them/their_lib). Although their_lib is an active project, my_lib needs to be independent because its goals are quite different.I expect that by the time my_lib sees its first release, I will have removed about 1/3 of their_lib's code, and re-written another 1/3. The two projects will therefore have about 1/3 of the original code (on the order of 10,000 lines) in common.How should I structure my git repository/ies to ease both the development of my project and, where possible, two-way sharing of code between the two libraries (e.g. bug fixes)?Should I start me/my_lib as a fork/clone of them/their_lib (i.e. including the full history), or would I be better off just importing the latest release of them/their_lib (perhaps leading to a tree structure like that illustrated here)?To share code in the their_lib => my_lib direction, how should I keep up to date with changes in them/their_lib? In the opposite direction, will I need a separate fork me/their_lib to use for pull requests?
How to structure git repository for a new project based on an existing one?
github;forking