简体   繁体   English

如何将github与visual studio代码连接起来?

[英]How to connect github with visual studio code?

I have started using Visual Studio Code ( https://code.visualstudio.com/ ) recently . 我最近开始使用Visual Studio Code( https://code.visualstudio.com/ )。 Started loving it. 开始爱它了。 But I have some doubts regarding how to connect to Visual Studio Code to github. 但我对如何连接Visual Studio Code到github有一些疑问。

I have one folder which contains 15 sub-folders and each sub-folder connected to a git repo. 我有一个文件夹,其中包含15个子文件夹和每个子文件夹连接到一个git仓库。 When I open a single sub-folder/git repo using Visual Studio Code, git operations working perfectly. 当我使用Visual Studio Code打开一个子文件夹/ git repo时,git操作完美运行。 But I want to open the root folder(containing 15 sub-folders) using Visual studio code, because i simultaneously work in all the repos. 但我想使用Visual Studio代码打开根文件夹(包含15个子文件夹),因为我同时在所有repos中工作。 The root folder is not attached to git, its just a folder on my local which contains all the repos. 根文件夹没有附加到git,它只是我本地的一个包含所有repos的文件夹。

Is it possible to do? 有可能吗?

Unfortunately VS Code git features are working only if you open directly folder with initialized git inside. 不幸的是,VS Code git功能只有在你直接打开带有初始化git的文件夹时才有效。 Otherwise it will not recognize it. 否则它将无法识别它。 At least this is true for V 1.5.2 对于V 1.5.2至少也是如此

Your project structure is messy omho. 你的项目结构很混乱。 Even with other IDEs/editors and/tools you will have difficulties managing all that (not the number of subfolders but the structure itself). 即使使用其他IDE /编辑器和/工具,您也难以管理所有这些(不是子文件夹的数量,而是结构本身)。 Check git submodules to see how to manage multiple git repos as one although I seriously doubt that VS Code supports this so you will probably end up using the good old terminal (at least you can have an embedded terminal in VS Code) or some graphical tool outside the editor. 检查git子模块 ,看看如何管理多个git repos作为一个虽然我严重怀疑VS Code支持这个,所以你可能最终会使用好的旧终端(至少你可以在VS Code中有一个嵌入式终端)或一些图形工具在编辑之外。 Still worth doing! 还是值得做!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM