-1

I'm trying to use GIT with Visual Studio. The situation is this:

  • \Base\Routines\Routines.csproj
  • \Base\Service\Service.sln
  • \Base\Service\MyApp\MyApp.csproj

The service solution includes the Routines project. As you can see the Routines project is in an external folder from Service solutions. I want to create my GIT repository in Service folder and not in Base folder. VS tells me projects external will be not included.

What is the best practice? I must make a copy of my routines project into my service folder or there is another way?

Thanks

Matteo

Matteo
  • 11
  • 1

2 Answers2

1

You need to use gitsubmodule. So, your solution will be in git repository, and Routines project will have its own git repository. And then, you could include your Routines project repository as submodule for Service repository. Check this link, for example.

kosist
  • 2,868
  • 2
  • 17
  • 30
0

If you put all projects within same base folder e.g: basefolder/project1, basefolder/project2 and then when creating git repo you can give path to basefolder. This way all folders/files within basefolder will be included/tracked. Tested this on vs 2022 community version.

devmet34
  • 19
  • 1
  • 5