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
git version 2.46.0.windows.1
).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.
Run git config --global --list
and git config --system --list
, if origin
is there then run git config --global --unset remote.origin.url