I have just started splitting up our Git repository that houses all of our product code, which includes shared libraries, server, client, and tooling code.
As a part of removing some of the tech-debt we have with our DCVS, we are proposing moving our shared client, and server libraries to a Nuget archive that will have tightly controlled push permissions on the development and release branches to force facilitation of pull requests that we have been slack with.
The splitting part is no big deal; I have tailored git filter-branch
to my liking with respect to history retainment, and am now looking at how to stitch repositories back together.
At the moment, the libraries are not entirely clear-cut and need some heavy refactoring before I am ready to package them up (as well as proper unit testing, and the like) and would like to be able to make changes to both repositories, with an emphasis on code review, as a short to medium term solution.
I have read enough about both git subtree
and git submodule
to understand their relative strengths and weaknesses, but am still conflicted about what to do. While an overwhelming number of resources protest against using git submodule
due to its fragility to those unknowing of how to use it (guilty!), it's alternative git subtree
seems to lack that explicit referencing features I am looking for.
If anyone has a similar setup to what I am looking for, or has a similar workflow done differently, could you comment on it? I am going to go away and test the two strategies while I "wait for a bite", and will hopefully have a more elevated assessment.