Using git thread with git subtree

I just moved the big svn repo to git and started using gitflow. It worked like a charm, but now I’m thinking about dividing this big repo into a few smaller ones.

Suppose the repo directory tree looks like this:

/repo - libs - apps -- app 1 -- app 2 

And we want to split it into three repositories, one with the main structure (libs and apps directories), and the other two with application directories.

If I use the git subtree for splitting like this, can I use the git thread individually in each part, or will I have to use it globally?

PS: This is my first question on stackoverflow, please be kind :)

+7
source share
1 answer

I do not use git thread, but I would say that the answer depends on how modular you are. Can you deploy the core structure without deploying app1 and app2? Can you deploy applications 1 and 2 independently of each other? Is your development team large and complex enough to be seen as independent workflows?

If the answer to these questions is yes, I would consider them as several projects, each of which has a unique flow. However, if the answer to any of them is “No”, I would avoid breaking your project. In fact, if changes in applications and applications 2 also require significant changes in the main repository, I would not be able to break your repositories at all.

Nested repositories, whether they run with subtree, submodules or (divinely forbid) only .gitignore by definition, make workflows more complex. Commands like git bisect and git log are becoming a little less useful; Tracking history and errors are getting a little more complicated. New developers need to learn a little more to start coding. From personal experience: walk this path carefully. If your sub-repositions are very intertwined, you will return here in a year, writing this answer for someone who wants to break their project, for example, the problematic version of "Wave It Forward".

+5
source

All Articles