Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should Git Repo's be at the Solution Level or Project Level in Visual Studio

If I have a C# solution with multiple projects in it, what would be better, to have the Git repo created in the solution folder, or in each individual project folder? Multiple developers will be working on the projects. What are your experiences with this?

like image 636
cmaduro Avatar asked Jul 07 '09 19:07

cmaduro


People also ask

How do I set Git credentials in Visual Studio?

To configure Git settings in Visual Studio, choose Settings from the top-level Git menu. Choose Git Global Settings or Git Repository Settings to view and configure global-level or repository-level settings.

How do I commit changes in Git using Visual Studio?

Just enter your commit message and then select Commit All. The equivalent command for this action is git commit -a . Visual Studio also makes it easy to commit and sync with one click by using the Commit All and Push and Commit All and Sync shortcuts.


1 Answers

I use several (sometimes over-lapping) solutions to contain a collection of related independent applications and shared libraries. As others have mentioned, you really don't want to have a single Git repository containing the source for multiple, independent projects as it makes it much too difficult to track isolated changes.

So, if your solution is structured as mine is then you will definitely want individual Git repositories for each project. This has worked well for me for ten to twelve applications and doesn't create as much maintenance overhead as you might think.

If your solution is truly monolithic (and your sure you want it that way forever and ever), then it probably makes sense to only have a single repository.

like image 118
bouvard Avatar answered Oct 05 '22 02:10

bouvard