admin管理员组文章数量:1316323
How is the following output possible? git remote
is still showing 'origin', after it has been removed:
$ git remote -v
origin
$ git remote remove origin
error: No such remote: 'origin'
I can add another 'origin', and remove it, but it is still listed afterward:
$ git remote add origin ../ # some arbitrary path
$ git remote -v
origin ../ (fetch)
origin ../ (push)
$ git remote remove origin
$ git remote -v
origin
The .git/config
file is
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
- This repo was created by cloning a local repo, and then removing 'origin'.
- I am on Windows (
git version 2.46.0.windows.1
).
EDIT
As Michele De Falco guessed, I have something in my config:
$ git config --global --list | grep origin
remote.origin.prune=true
After removing it, the output of git remote -v
is empty, as expected.
How is the following output possible? git remote
is still showing 'origin', after it has been removed:
$ git remote -v
origin
$ git remote remove origin
error: No such remote: 'origin'
I can add another 'origin', and remove it, but it is still listed afterward:
$ git remote add origin ../ # some arbitrary path
$ git remote -v
origin ../ (fetch)
origin ../ (push)
$ git remote remove origin
$ git remote -v
origin
The .git/config
file is
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
- This repo was created by cloning a local repo, and then removing 'origin'.
- I am on Windows (
git version 2.46.0.windows.1
).
EDIT
As Michele De Falco guessed, I have something in my config:
$ git config --global --list | grep origin
remote.origin.prune=true
After removing it, the output of git remote -v
is empty, as expected.
1 Answer
Reset to default 4Run git config --global --list
and git config --system --list
, if origin
is there then run git config --global --unset remote.origin.url
本文标签: git remote lists 39origin39 after removalStack Overflow
版权声明:本文标题:`git remote` lists 'origin' after removal - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742003638a2411521.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
git config --global --list
andgit config --system --list
, iforigin
is there then rungit config --global --unset remote.origin.url
– Michele De Falco Commented Jan 29 at 10:37