1

I am working with VS Code IDE and cloned two repos. i.e.

git clone url://repo1
cd new
git clone url://repo2 new2

However,VS code is only tracking one repo for changes. it grays out new2 folder(it is part of repo1 gitignore). also if I make any changes it does not reflect in left panel of VS code source control.

Is it possible in Visual studio code to work with two repositories and tracking/pulling/pushing changes of both repos?

Disclaimer : I have not worked much on git or VS code earlier.

Bhavesh Ghodasara
  • 1,981
  • 2
  • 15
  • 29

1 Answers1

2

I am able to solve this issue by adding a dummy .submodules file at root folder, and adding it to .gitignore

contain of .submoudles file:

[submodule "your_module_name"]
    path = paht_of_submodule/
    url = dummy_string_to_satisfy_vscode

More details here : https://github.com/microsoft/vscode/issues/37947 and https://git-scm.com/docs/gitmodules

Brian Burns
  • 20,575
  • 8
  • 83
  • 77
Bhavesh Ghodasara
  • 1,981
  • 2
  • 15
  • 29