ashis@Asus MINGW64 C:/Users/ashis/AppData/Local/Programs/Microsoft VS Code $ git inint 致命:无法访问 'C:\Users?shis/.config/git/config':参数无效
无法在我的 vs code git bash 上运行任何 git 命令,而我可以使用其他终端运行我也尝试多次卸载和安装 vs code 和 git,但问题仍然存在
看图片 在git上测试
❯ mkdir mygit /0.0s
❯ cd mygit /0.1s
❯ l
total 8.0K
drwxr-xr-x 2 zen users 4.0K May 15 09:28 .
drwx------ 52 zen users 4.0K May 15 09:28 .. /0.0s
❯ git init -b main
Initialized empty Git repository in /home/zen/mygit/.git/ /0.1s
❯ l
total 12K
drwxr-xr-x 3 zen users 4.0K May 15 09:28 .
drwx------ 52 zen users 4.0K May 15 09:28 ..
drwxr-xr-x 7 zen users 4.0K May 15 09:28 .git /0.0s
❯ git status
On branch main
No commits yet
nothing to commit (create/copy files and use "git add" to track) /0.1s
~/mygit main
❯
尝试使用:
git init -b main
在新目录中,使用 CMD 代替 VsCode,查看问题是否出在 VsCode 的终端中。