首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法删除git remote

无法删除git remote
EN

Stack Overflow用户
提问于 2020-10-20 07:14:51
回答 1查看 52关注 0票数 2

每次我使用'git init‘的时候。一些旧的存储库显示为原始存储库

代码语言:javascript
复制
git remote -v       
origin  https://github.com/a.git (fetch)
origin  https://github.com/a.git (push)

我无法删除主题

代码语言:javascript
复制
git remote remove origin
fatal: Remote-Repository not found: 'origin'

我可以添加新的遥控器

代码语言:javascript
复制
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)

代码语言:javascript
复制
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,删除本地存储库...都不起作用

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-10-20 07:52:17

我怀疑你的全局git配置中有一个远程origin。要验证:

代码语言:javascript
复制
git config --global --get-regexp ^remote.origin.

如果该命令至少返回remote.origin.url,请从全局配置中删除遥控器:

代码语言:javascript
复制
git config --global --remove-section remote.origin
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64436287

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档