I recently had a situation where a library I was working on, originally as part of one project, was going to be needed for another project. The ideal way to handle this situation, is to have the library files as their own git repo which is then added to the projects as a submodule. This way any changes required to the submodule for the needs of each project can be shared easily. It took me much longer than I would’ve liked to, but I finally managed to find the solution and wanted to share it with anyone else who might need it.