Reputation: 3681
In terms of organizing a new project, what are the pros/cons of having one Git repository with subdirectories for web/ios/android/etc versus having independent repositories for each?
Any recommendations?
Upvotes: 18
Views: 3386
Reputation: 47668
Git doesn't provide easy way to checkout sub-directory from a repository. That means if you have two teams working on android and ios version respectively every one of them will have to checkout code of the other team.
What's worse git log will be a complete mess as it'll contain commits from all of the applications. That might cause some troubles while creating and merging branches related to particular application as well.
I don't see any good reason for having separate projects in the same git repository.
If you want to have some central repository where you can store additional stuff like docs or smth else that is related to the whole project and not one of the application you can create central repository and add repository of each application to it as git submodule.
Upvotes: 16
Reputation: 97345
If apps share common code in some way, you can think about separating apps into branches also. Anyway, not a single branch with tree for projects inside it
Upvotes: 0