Git SubModule Visual Studio

2020-08-20 01:43发布

We're moving to Git. Now i've read everything which says don't use submodules with Git, however, I think it fits our purpose. We have shared libraries that need to be updated no matter which project they're in and then synced back to the server.

I've added the project to git, added a subproject and that all seems to work. However, a really weird thing happens, as soon as I save a file in visual studio that's part of the subproject, it no longer marks it as a change and I can no longer commit it or push it. It all works fine in the main project. It marks it as changed until the file is saved and then it disappears?

enter image description here

Any clues/tips would be really appreciated

1条回答
何必那么认真
2楼-- · 2020-08-20 02:41

There is a request in VisualStudio UserVoice to allow Commit changes to a submodule using VS, the request specifies the following:

The same features that we have for files in GIT repositories should be available for files in submodules, too:

  • being able to commit changes to the submodule
  • current branch, pending changes and unpublished commits being displayed at bottom on VS window
  • mini-info about the file (n changes | n authors, n changes)
  • view history / annotate / compare with unmodified
  • etc.

If you also want these features to be implemented please vote here so it will get prioritized

查看更多
登录 后发表回答