windows - 如何在 Windows 上更改远程/目标存储库 URL?

标签 windows git github

<分区>

我在 Windows 上创建了一个本地 GIT 存储库。我们称之为 AAA。我暂存、提交并将内容推送到 GitHub。 git@github.com:用户名/AAA.git

我意识到我把名字弄错了。

在GitHub上,我重命名为git@github.com:username/BBB.git

现在,在我的 Windows 机器上,我需要将 git@github.com:username/AAA.git 更改为 git@github.com:username/BBB.git 因为设置仍在尝试“推送”到 git@github.com:username/AAA.git 但我需要推送到 git@github.com:username/BBB.git 现在。

我该怎么做?

最佳答案

git remote set-url origin <URL>

关于windows - 如何在 Windows 上更改远程/目标存储库 URL?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1800859/

相关文章:

Git 在更新时默默地 merge 应该发生冲突的内容

git - 使用GIT部署网站

git - 哪些程序使用 .gitconfig 中的 [github] 部分?

linux - 无法在 Julia 中打开文件

python - 使用Python从USB获取数据

java - 使用 javaw.exe 启动应用程序时不执行关闭 Hook

windows - VB6 程序使用的 32 位 dll 在 64 位 Win 7 中不起作用

从程序集调用 C mainCRTStartup 函数(MASM 兼容)

git - 如何在 Visual Studio 2010 Beta 2 上安装 GitExtensions?

Github 拉取请求 "Good to merge"