JM *_*nas 10 git visual-studio-code git-for-windows
我正在使用一台装有 Windows 操作系统的工作 PC,并且习惯于使用 ubuntu 操作系统进行 Rails 开发。我在 VSCode 上使用 wsl 作为 ubuntu 正确安装了所有内容,在 Windows 上使用 git 正确安装了所有内容,但问题是源代码控制面板没有检测到任何内容,它只是显示以下内容:
。
我该如何解决这个问题?
这是我的安装参考。
https://code.visualstudio.com/
https://learn.microsoft.com/en-us/windows/wsl/install
https://git-scm.com/download/win
Had*_*umi 16
您需要使用推荐的命令将 repo 目录添加为安全目录:
git config --global --add safe.directory 'path/to/repo'
Run Code Online (Sandbox Code Playgroud)
你也可以信任任何目录(但不推荐)
git config --global --add safe.directory *
Run Code Online (Sandbox Code Playgroud)
如果你遇到这样的错误:
error "fatal: bad config file line 1 in .git/config"
Run Code Online (Sandbox Code Playgroud)
请看27073427的回答
归档时间: |
|
查看次数: |
15560 次 |
最近记录: |