Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git Submodules Awareness in VS Code Not Working

Using version 1.22.2. According to the release notes from VS Code 1.2, there's supposed to be an awareness of Git submodules. However, I can't seem to get this feature to work:

  1. Open a folder containing a git project that in turn contains submodules
  2. Make a change in one of the submodules
  3. Observe that the source control view merely states the submodule object changed in the main repository
like image 479
Tohuw Avatar asked Aug 23 '26 15:08

Tohuw


1 Answers

There is basic support in place which lets you stage, unstage or discard submodule changes in the outer repository. You can disable automatic submodule detection with the git.detectSubmodules setting.

I suspect "submodule changes" are only the top tree SHA1 (the gitlink) recorded in the parent repo index, not the files within that submodule.

The gitlink is the diff shown in the picture seen in the release notes:

https://code.visualstudio.com/assets/updates/1_20/submodules.png

like image 165
VonC Avatar answered Aug 26 '26 21:08

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!