[英]Remove git integrations from VSCode
我下載了 Visual Studio Code 以在工作中試用,我幾乎愛上了它的所有內容。 不過我不喜歡的部分是:Git 集成。
我導入了我的整個工作文件夾(約 14000 個源文件 + git 項目),Visual Studio Code 中的布局和所有內容都很棒。 我從我們傳統的代碼編輯器轉向了這個,因為它對我來說似乎更好用。
不過,我的主要問題是,如果我正在處理一個文件並保存它,Visual Studio Code 會凍結大約 30-60 秒。 起初我很困惑,但后來我注意到 Git 選項卡正在“工作”。 根據我的最佳猜測,在我保存文件后,它會遍歷所有 ~14000 個文件並執行某些操作 - 我不確定是什么。 有誰知道是否有辦法從 VSC 中刪除 Git 集成,或者至少讓它忽略它認為它在做什么?
將此添加到settings.json
:
// Whether git is enabled.
"git.enabled": false,
其他一些與 Git 執行相關的命令:
// Path and filename of the git executable, e.g. `C:\Program Files\Git\bin\git.exe` (Windows).
"git.path": null,
// When enabled, commits will automatically be fetched from the default remote of the current Git repository.
"git.autofetch": false,
目前無法通過選項禁用git。 請將此問題報告給我們(從“幫助”菜單中,您可以報告問題)。
作為變通方法/黑客,您可以打開 C:\\Users\\<your name>\\AppData\\Local\\Code\\app-0.1.0\\resources\\app\\index.js
並將enableGit
從true
更改為false
。但是,此更改將無法在將來的更新中存續
請參閱以下正確答案: https : //stackoverflow.com/a/33956083/1748123
對已接受的答案僅添加一項:
默認情況下,Visual Studio Code 還會.gitignore
文件,並避免在“Git 忽略”文件中搜索,即使 Git 集成被禁用。 要禁用此功能並允許搜索所有文件,請將以下行添加到settings.json
文件中:
"search.useIgnoreFiles": false,
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.