git - 在处理其他项目时如何在 vs 代码中关闭终端中的当前 git 存储库

标签 git visual-studio-code gitlab

我将 vs code 连接到 Git。

但是当我在不在 Git 中的其他项目上工作时,在 git 文件夹正在运行的 vs 代码的终端中,所以如果将终端用于其他项目,则更改是在该 Git 文件夹上完成的。

现在,我在 VSCode 中禁用了 Git。

我应该怎么做?

最佳答案

when I work on other projects not in git, in a terminal of vs code that git folder is running so if use terminal for other projects, changes are done on that git folder.

这些更改不应在该 Git 文件夹中完成。

除非其他项目位于 Git 存储库根文件夹下方的子文件夹中。

如果您确保使用文件夹中的其他项目不是现有 Git 存储库的子文件夹,则不会记录任何 Git 更改,并且您可以继续为其他项目使用 VSCode 而不会影响您现有的 Git 存储库。

关于git - 在处理其他项目时如何在 vs 代码中关闭终端中的当前 git 存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62274691/

相关文章:

git - 我更改了我的 github 用户名。如何更新本地存储库以指向新位置?

heroku - GitLab CI - 缩短变量值

macos - 从 Gitlab 实例克隆时,Jenkins 在 Mac slave 上挂起

Git 将 merge 的提交一分为二

git - 什么时候需要 git-rebase?

android - 安装 build/app/outputs/flutter-apk/app.apk... 在 flutter 运行后丢失/没有发生。设备上未保存任何应用

ruby - Visual Studio 代码 : Disabling Error/Warning checks in for specific file type

gitlab - 禁用Gitlab中每个提交的管道,仅在打开合并请求时运行它

git - 何时应在 Git 存储库中跟踪 pdf 文件,何时不应

python - 如何让 VS code 与 Pybuilder python 项目一起使用?