gpt4 book ai didi

Git - 致命 : Will not delete all non-push URLs

转载 作者:太空狗 更新时间:2023-10-29 13:17:38 34 4
gpt4 key购买 nike

当试图删除我的存储库中的默认 url 时,我发出了命令:

git remote set-url --delete origin https://github.com/dpressey/barberapp.git

我收到如上标题所示的错误。我如何删除这个“https”网址,然后添加一个“ssh”网址,以便我可以推送到它?

最佳答案

来自 Git's remote documentation , --delete应该与:

git remote set-url --push --delete origin [https://github.com/dpressey/barberapp.git]

因为语法是--delete <name> <url>其中 <url>是正则表达式。


作为旁注,应该指出还有 git remote rm <name>删除每个与给定名称匹配的 Remote ,无论 URL 是什么。

关于Git - 致命 : Will not delete all non-push URLs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25463839/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com