Git listing non-existent remotes

后端 未结 1 1592
半阙折子戏
半阙折子戏 2021-01-12 14:42

I recently made some changes to my remote repos in my Git repo config file. I renamed the remote names, changing my origin to another remote repo and renaming my old origin

相关标签:
1条回答
  • 2021-01-12 15:28

    You used to have a remote named future, and you don't now.

    Hence, git remote whatever future can't help, because there is no remote named future. (Normally git remote update -p or git remote prune, as in the comments above, would let you get rid of these.)

    The simplest option would seem to be to delete them manually:

    git update-ref -d refs/remotes/future/branch1
    git update-ref -d refs/remotes/future/branch2
    

    (or rm -r .git/refs/remotes/future and/or edit .git/packed-refs, depending on whether these refs have gotten packed).

    [Incidentally, I'd also run git config -e (or vi .git/config which is what I usually really do :-) ) and make sure there are no other left-over references to the future remote.]

    0 讨论(0)
提交回复
热议问题