git - 无法删除 git 远程
问题描述
每次我使用'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/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)
或者
origin https://github.com/a.git (fetch)
origin https://github.com/a.git (push)
origin https://b@bitbucket.org/b.git (fetch)
origin https://b@bitbucket.org/b.git (push)
如果我喜欢(在这两种情况下),则删除“b”,但无法删除“a”
我试图删除旧的全局 git 文件,尝试 set-url,删除本地 repo ...没有工作
解决方案
我怀疑你origin
的全局 git 配置中有一个遥控器。核实:
git config --global --get-regexp ^remote.origin.
如果命令返回至少remote.origin.url
从全局配置中删除远程:
git config --global --remove-section remote.origin
推荐阅读
- java - 计时器无法按预期工作,因为它会立即结束程序
- multithreading - Goroutine-停止运行进程
- cuda - 当 cudaDeviceSynchronize() 出现错误 30?
- html - 导航栏不会一直走到边缘
- solr - Solr 8.6.3 无法索引 html 文件
- rest - 在具有应该唯一的指定属性的记录已经存在的情况下,是否可以使用 409 HTTP 代码?
- c++ - “错误 LNK2019:在函数 _main 中引用的未解析的外部符号 _long_add@12”在 C++ 中使用汇编函数时
- python - 在 3 维列表上使用 python pop() 时,它会从其他索引中删除元素
- xslt - 如何在xslt中将属性值作为整数取出?
- mysql - FULL OUTER JOIN sql 语句上的 SQL 错误