gpt4 book ai didi

git - VSCode 自动在终端打开 Git shell - 如何禁用它?

转载 作者:IT王子 更新时间:2023-10-29 01:27:56 30 4
gpt4 key购买 nike

自上一个 VSCode 版本以来,有一个 pop 窗口询问我是否要允许 Git 打开。好吧,我允许了,现在每次我尝试打开集成终端时,Git Shell 都会从外部打开并关闭集成终端。

我的用户配置:

"terminal.integrated.shell.windows": "C:\\WINDOWS\\Sysnative\\WindowsPowerShell\\v1.0\\powershell.exe"

但这并没有帮助,因为 git 已经在运行。

我想改为打开 powershell,并像以前一样在 VSCode 中安装 git shell。我怎样才能做到这一点?

更新:

我按照 VonC 的建议运行 git config -l --show-origin:

file:"C:\\ProgramData/Git/config"       core.symlinks=false
file:"C:\\ProgramData/Git/config" core.autocrlf=true
file:"C:\\ProgramData/Git/config" core.fscache=true
file:"C:\\ProgramData/Git/config" color.diff=auto
file:"C:\\ProgramData/Git/config" color.status=auto
file:"C:\\ProgramData/Git/config" color.branch=auto
file:"C:\\ProgramData/Git/config" color.interactive=true
file:"C:\\ProgramData/Git/config" help.format=html
file:"C:\\ProgramData/Git/config" http.sslcainfo=D:/TOOLS/Git/mingw64/ssl/certs/ca-bundle.crt
file:"C:\\ProgramData/Git/config" diff.astextplain.textconv=astextplain
file:"C:\\ProgramData/Git/config" rebase.autosquash=true
file:"D:\\TOOLS\\Git\\mingw64/etc/gitconfig" credential.helper=manager
file:C:/Users/myusername/.gitconfig filter.lfs.clean=git-lfs clean -- %f
file:C:/Users/myusername/.gitconfig filter.lfs.smudge=git-lfs smudge -- %f
file:C:/Users/myusername/.gitconfig filter.lfs.process=git-lfs filter-process
file:C:/Users/myusername/.gitconfig filter.lfs.required=true
file:C:/Users/myusername/.gitconfig user.name=MYName
file:C:/Users/myusername/.gitconfig user.email=some@email.com
file:.git/config core.repositoryformatversion=0
file:.git/config core.filemode=false
file:.git/config core.bare=false
file:.git/config core.logallrefupdates=true
file:.git/config core.symlinks=false
file:.git/config core.ignorecase=true
file:.git/config remote.origin.url=https://github.com/MyProject/my-project.git
file:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
file:.git/config branch.master.remote=origin
file:.git/config branch.master.merge=refs/heads/master
file:.git/config branch.routing.remote=origin
file:.git/config branch.routing.merge=refs/heads/routing

我的 VScode 用户设置:

"php.validate.executablePath": "D:/TOOLS/xampp7/php/php.exe",
"php.suggest.basic": false,
"window.zoomLevel": 0,
"workbench.colorTheme": "Monokai",
"workbench.iconTheme": "vs-seti",
"git.path": "D:/TOOLS/Git/cmd/git.exe",
// A glob pattern that defines files and folders to exclude while listing annotations
"todohighlight.exclude": "{**/node_modules/**,**/bower_components/**,**/bower/**,**/libs/**,**/vendor/**,**/dist/**,**/build/**,**/.vscode/**,**/_output/**,**/*.min.*,**/*.map}",
"git.autofetch": true,
"git.confirmSync": false,
"git.enableSmartCommit": true,
"explorer.confirmDelete": false,
"terminal.integrated.shell.windows": "C:\\WINDOWS\\Sysnative\\WindowsPowerShell\\v1.0\\powershell.exe",
"todo.colors.tag": "#967848",
"todo.colors.code": "#fbf5cb",

使用 git 关键字的默认设置:

  "projectManager.git.baseFolders": [],
"projectManager.git.maxDepthRecursion": 4,
"git.autofetch": false,
"git.autorefresh": true,
"git.checkoutType": "all",
"git.confirmSync": true,
"git.countBadge": "all",
"git.decorations.enabled": true,
"git.defaultCloneDirectory": null,
"git.enableCommitSigning": false,
"git.enabled": true,
"git.enableSmartCommit": false,
"git.ignoreLegacyWarning": false,
"git.ignoreLimitWarning": false,
"git.ignoreMissingGitWarning": false,
"git.path": null,

最佳答案

I think that this is more a git thing

如果您确实使用了安装程序,则卸载 Git for Windows。
为此,首先,检查(并移动/删除)列出的各种 Git 配置文件:

git config -l --show-origin

如果这是来自 Git 设置,您可以在那里看到它。

关于git - VSCode 自动在终端打开 Git shell - 如何禁用它?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48424259/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com