如果您在使用 git remote add origin 命令时遇到 'remote origin already exists' 错误,这是因为您的本地存储库已经关联了一个名为 'origin' 的远程存储库。每个本地存储库只能有一个名为 'origin' 的远程存储库。

如果您想要更改远程存储库的 URL,可以使用以下命令:

git remote set-url origin https://github.com/BlackCorvu/note.git

该命令将更新名为 'origin' 的远程存储库的 URL。

解决 Git 错误: 'remote origin already exists'

原文地址: https://www.cveoy.top/t/topic/qyxc 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录