How to create a simple cmake project for visual studio 2022 and connect it with existing git repository?

Viewed 21

I can easily create a new cmake project connecting all the necessary libraries and my source code. Then I have no problem creating a new git repository for that project using visual studio 2022. But I can't find a proper solution to connect to the same repository from another machine. The problem I'm facing is that when I follow the same procedure on another machine and create a new .sln project using cmake I want to connect it to the previously created git repository. The solution might be to remove local sources inside a new project and clone the repository to an empty directory inside the solution and add files to the project but VS2022 refuses a different than the main directory of a solution.

Does anybody know a simple solution to create a VC2022 project using a cmake and connect it to git repository?

0 Answers
Related