I have been programming in C#/.Net and other languages as a hobby for over 6 years, so I do not have adequate knowledge about application architecture, hence my request for advice.

The current solution I'm working on already contains 5+ applications (ASP.NET, WPF, Conosole), and growing, plus service classes and other layers. Some services are shared by different applications.

I want to seek third party help in writing code. However, I do not want the subcontractor to have access to the Git repository of the entire solution, only to the selected application and the classes it uses, including those shared by other applications.

Things I tested:

  • Git Submodules,
  • Git Subtrees.

Both solutions have problems that make it difficult to work on the same code in parallel. Currently, the best solution I have found is:

  • I create a collective main repository with documentation, TODO list, etc.,
  • to the main solution for this repository, I import individual application projects on my machine that are pushed to separate repositories,
  • I divided the service classes thematically into library projects, which are also pushed to their own separate repositories and are also imported into the main solution,
  • in the main solution I can pull all repositories with a script,
  • the subcontractor can clone the application and designated library projects that he can use and work on
  • all without using Submodules or Subtrees.

Pros: the repositories do not know about each other (before being refered in Visual Studio) and can only be connected in the main solution or in a subcontractor's solution, so I can add, delete and modify them, also work in parallel with them.

Cons: I have to remember to pull every time I get to work, I have to create a huge number of repositories and projects for them and carefully control the application / service tree.

Maybe you know a better solution for Git? I am aware of other similar threads, but I hope that more convenient tools may have appeared:

Thank you in advance for reading and your help

1 Answer 1


First off,

You need to be able to trust your employee. Decompilation is a thing.

Secondly, you should have individual git repositories for each app/library. Each repo should have a CI pipeline which builds the project and publishes the built libraries as nuget packages or apps to the dev/test servers

Dependent repos can then reference library projects as nugets and pull them from your nuget repo when you build, either locally or in a pipeline.

You can then have different access permissions per git repo and manage access to your nuget-repo with firewall/tokens whatever is offered by the provider

  • Yes, actually with the latest approach I have separate repos for each app and library. I was wondering if there is easier solition with Git.
    – bakunet
    Commented Feb 9 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.