如何断开git config <url> .insteadOf <url>的链接

Jae*_*Kim 3 git url config

我使用git config .insteadOf将其URL设置为其他URL,现在我想断开它的链接。但是我不知道该怎么做,也无法在参考页上找到它。

tux*_*fly 6

您所有的 git 配置更改都转到~/.gitconfig,因此您应该能够对其进行编辑,相关部分如下所示:

[url "git@github.com"]
        insteadOf = gh
Run Code Online (Sandbox Code Playgroud)

所以,也许尝试删除这些行?


Von*_*onC 5

您可以使用以下命令删除[url“ git@github.com”]部分:

git config --global --remove-section url."git@github.com"
Run Code Online (Sandbox Code Playgroud)

这比尝试手动编辑git config文件更安全。

参考页:git config#--remove-section