git - GitHub : "remote: This repository moved. Please use the new location" 中重命名的 repo 出错

标签 git

当我将更新从我的本地实例推送到 GitHub 上的远程主机时,我收到此通知:

remote: This repository moved. Please use the new location [new location]

有办法解决这个问题吗?

最佳答案

简单的方法是:

git remote set-url origin [updated link url https://........git]

或者,如果您喜欢长途旅行:

git remote rm origin
git remote add origin [updated link]

Changing a remote's URL GitHub 文档有更详细的介绍。

关于git - GitHub : "remote: This repository moved. Please use the new location" 中重命名的 repo 出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30443333/

相关文章:

即使更改了几个文件,Git 也会推送整个项目。 AWS

git - git cherry 和 git log --cherry 命令之间的区别

git - 如何列出所有未更改(跟踪)的文件?

Git + 智能 HTTP 问题(无法推送/pull )

git - 为什么我使用GitFlow时需要将release分支 merge 到develop分支?

git - 一个 git 子模块卡在错误的提交 ('submodule update' 不工作)

git - cherry-pick : Mainline branch is not specified but b0c4de0c8e164d09efe73a24aec3f9096c860e1f is a merge commit

bash - 为什么 Jenkins 胜过简单的 bash 脚本?

java - JGit:我可以在不检查的情况下找出 Git 存储库中是否存在特定标签吗?

git - 如何指定自定义全局 gitconfig 路径?