Workflow for using git submodules in Visual Studio

前端 未结 2 377
再見小時候
再見小時候 2021-02-04 05:53

I have some shared code I want to share among a number of solutions. Most examples use the command line, but I want to do it using Visual Studio 2013 (and/or TortoiseGi

2条回答
  •  执念已碎
    2021-02-04 06:06

    After much experimenting...

    In VS, add the shared projects from the submodule to the solution. They seem to live "outside" the parent solution as far as versioning.

    If you make an edit to the submodule's projects, they are local. They need to be committed and pushed to the source repo, and then you need to merge them there. If you make changes at the source, you need to pull them manually into your solution's git submodule.

    Problem is VS doesn't do any of this for you, so you need to use something like TortoiseGit or the command line.

提交回复
热议问题