无法删除git remote
每次我使用“git init”。一些旧的回购协议似乎是起源无法删除git remote,git,github,Git,Github,每次我使用“git init”。一些旧的回购协议似乎是起源 git remote -v origin https://github.com/a.git (fetch) origin https://github.com/a.git (push) 我不能删除主题 git remote remove origin fatal: Remote-Repository not found: 'origin' 我可以添加新的遥控器 origin https://github.com/
git remote -v
origin https://github.com/a.git (fetch)
origin https://github.com/a.git (push)
我不能删除主题
git remote remove origin
fatal: Remote-Repository not found: 'origin'
我可以添加新的遥控器
origin https://github.com/a.git (fetch)
origin https://github.com/a.git (push)
bucket https://b@bitbucket.org/b.git (fetch)
bucket https://b@bitbucket.org/b.git (push)
或
如果我愿意,可以删除“b”(在这两种情况下),但不可能删除“a”
我尝试删除旧的全局git文件,尝试设置url,删除本地repo。。。没有工作我怀疑您的全局git配置中有一个远程
源站
。要验证:
git config --global --get-regexp ^remote.origin.
如果命令至少返回remote.origin.url
从全局配置中删除远程:
git config --global --remove-section remote.origin
在现有存储库中运行
git init
,不会更改任何现有设置。如果你正在创建一个新的空存储库,phd的答案就是这个问题
git config --global --remove-section remote.origin