0

When right-clicking in vscode on a subfolder I have these 2 options:

  • Open as new Workbench
  • Open as Workspace

I can't see clearly the difference, as for git, it seems that it seems the repo is still the parent whereas I do want to create a local repo in that subfolder. When I select workspace, it doesn't open the subfolder as Workspace but the whole parent folder.

Is there a way I can create a Git repo in a subfolder from VSCode using the GUI or am I obliged to use command line ?

user310291
  • 36,946
  • 82
  • 271
  • 487
  • If you're talking about a subfolder of an already existing repo it's not really possible to create a nested repo. Look into git submodules if that's actually what you want. You'll probably need to manually set it up. – oyvind May 13 '18 at 14:55
  • @oyvind I have cloned a github repo in it without using sub-module: is there any problem doing so ? – user310291 May 13 '18 at 15:34
  • It's possible yes, but it's not optimal for a number of reasons. this is the problem submodules are meant to solve, but a lot of people find them confusing. At the very least you should add the inside repo's . git folder to the outside repo's .gitignore. more discussion can be found here https://stackoverflow.com/q/4659549/1463246 – oyvind May 13 '18 at 15:58
  • @oyvind thanks for suggestion, indeed submodules are confusing :) – user310291 May 13 '18 at 17:02

0 Answers0