It seems like its not possible to have Git support if the actual repo lives in a subfolder of the project.
My current Folder structure look like this:
Project/
GitRepositoryWithTheCode/
DesignerStuff/ (images, etc)
Documentation/
ect../
In this setup, the GitRepo is not tracked, so sadly I cannot use the benefits of this feature :(
Did I missed some configuration, where I could map the git repo to the GitFolder?
Yes, unfortunately this doesn't work. You need to open Code at GitRepositoryWithTheCode.
@joaomoreno It seems that nobody cares about this.
Is there a solid reason for which the design should not change to meet all users' needs? Why not handle git repositories from sub-folders?
In my case I have a root folder called Projects in which I have multiple git repositories. There are too many to open them separately in different windows and switching between them is pretty annoying. I'm really dissapointed seeing that this hasn't been fixed yet and voting is closed on uservoice.com: https://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/9483534-recognize-git-repositories-in-nested-folders
Seems like a duplicate of #396...
@jlk #396 may be related but there are two different issues:
/tmp and ~/Projects for example)Projects/
project1/
.git
lib/
.git
lib.c
main.c
a.out
project2/
component1/
.git
file0
component2/
.git
file1
@aalexgabi Yep - fair point. Seems like #2 is a subset of #1, but I see now that they're not full duplicates of each other.
I too requires this feature. All my code is modules or "microservices" inside a company folder. I have 40+ projects, not practical to have 40 code windows open one to each individual folder. This is why I keep going back to sublime, because it recognizes the git repo of the FILE you are currently working in, no of the root of your "project".
I am also facing the same problem in VS Code. Are there any plans by MSFT to address this? Support for multiple folders without having to pack your projects into the same root folder, could possibly fix this I guess?
Me too. I've never used the GIT features of VS Code because my projects all consist of multiple repos.
Closing as a duplicate of #396. Supporting multiple workspaces will enable working with multiple Git repositories.
Most helpful comment
@joaomoreno It seems that nobody cares about this.
Is there a solid reason for which the design should not change to meet all users' needs? Why not handle git repositories from sub-folders?
In my case I have a root folder called Projects in which I have multiple git repositories. There are too many to open them separately in different windows and switching between them is pretty annoying. I'm really dissapointed seeing that this hasn't been fixed yet and voting is closed on uservoice.com: https://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/9483534-recognize-git-repositories-in-nested-folders