Matteo
Matteo

Reputation: 11

Visual Studio 2017 and GIT with external project

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

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?

Upvotes: -1

Views: 282

Answers (2)

devmet34
devmet34

Reputation: 27

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.

Upvotes: 0

kosist
kosist

Reputation: 3057

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.

Upvotes: 1

Related Questions