github 的远程源已经存在

0 git github

“错误:远程源已经存在”当尝试将我使用 git 从终端准备的 python 项目导入到 github 时,我收到错误。

error: remote origin already exists.
Run Code Online (Sandbox Code Playgroud)

小智 8

错误fatal: remote origin already exists当您尝试创建指向名为 \xe2\x80\x9corigin\xe2\x80\x9d 的远程存储库的链接(且已配置具有该名称的远程链接)时,会导致该

\n

解决方案是将名称为 \xe2\x80\x9corigin\xe2\x80\x9d 的远程存储库的 URL 更新为要添加的远程存储库的 URL,而不是尝试使用该名称创建新的远程存储库。

\n

您可以使用以下命令来做到这一点:

\n

git remote set-url origin https://github.com/your/repository

\n

来源:https ://www.datree.io/resources/git-error-fatal-remote-origin-already-exists

\n