How to best structure Git for our team [closed]

We’re starting to develop many small web projects in our company, where mostly they will have one shared resource with some code pieces (SDKs, utilities and etc…)

Our team is small (~5) but is growing and is expected to grow x2-x3 in several months.

We’re discussing what would be the right way to build our source control and came up with 2 main ideas:

  1. Put all code in one repo which will be synced with Github. Everyone
    will have the copy of all projects and will have the shared
    resources folder as well – thus will be able to pull/push the shared
    code and the project code with only one action. Also, there will be
    no need to follow multiple repositories. On the other side, this
    might create confusion and errors – as all the code pulled/pushed
    even if working only on one project.

  2. Put each project in its own repo and put the shared resources
    project in its own repo. Thus everyone who is working on a project
    will work only on that repo and won’t have to push / pull other
    repos. This will create a more streamlined work – but will make
    everyone work with at least 2 repositories (shared resources and his
    project), which might create confusion.

I would be glad to know if one of the options is a bad idea or if there is a better way.

Thanks!

3

I’d suggest to create a new repository for every project. Aside from the fact that it is common practice, it is practical as well. One of the advantages would be that you don’t have to retrieve all projects, when you just want to work on a single project. A second advantage would be that everything files, branches, log-messages etc. are applicable to a single project, so you don’t have to dig through irrelevant information.

If one project is dependent on another project, you can use the git submodule functionality. Changes made to the submodule can easily be pushed to the central repository (e.g., GitHub) and pulled by the other projects, such that they benefit as well. Of course you can also create branches for the submodule, in case you have project-specific changes. More on submodules in git can be found here at the Git Submodule Documentation.

0

My team have taken a different approach to the shared resources issue, which is to publish it as a NuGet package and host it on a local network share. This has the advantage that when you update the shared resource with a breaking change, you don’t break the projects that depend on it. One small disadvantage is that it is time-consuming to make small changes (e.g. adding an extension method), but I feel the pros outweigh the cons

More information on that can be found on the NuGet docs.

3

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật