I have seen the related question Cannot remove remote origin but it asks about adding a new origin (ie change the url of origin). However I would like to not have any remote named 'origin'.
If I have a remote named origin and run git remote remove origin
it seem to replace that with an empty origin. git remote -v
lists origin without url and it can't be removed.
Since git is distributed it would make sense to me to be able to have remote A
and B
none of them named origin. But a git fetch --all
in this scenario will still complain that it can't fetch from that empty origin that I can't remove.
In summary: Is it possible to remove the origin remote completely?
Run:
git config --show-origin --get-regexp ^remote
to see which origin.*
entries are defined in which config files. My guess is that you have defined remote.origin
in your $HOME/.gitconfig
file.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.