我想重命名我在GitHub上的一个存储库,但当我看到一个大大的红色警告时说:

我们将不设置任何重定向从旧的位置 您需要更新本地存储库以指向新的位置 重命名可能需要几分钟才能完成

有人知道如何手动完成#1和#2的步骤说明吗?或者我要在当地做什么?


当前回答

从浏览器打开这个url (https://github.com/) 转到页面右端的存储库 打开要重命名的存储库的链接 点击设置(你可以在导航栏中找到) 在顶部,您将发现一个名为(Repository name)的框,您可以在其中写入新名称 按重命名

其他回答

此解决方案适用于使用GitHub桌面的用户。

从GitHub.com上的设置重命名您的存储库 现在在桌面上单击“同步”。

完成了。

简单的解决方案:

1)打开您的项目url: https://github.com/someuser/project-name 2)在顶部,除了项目名称,点击编辑

这是我找到的最简单的方法

去你的回购链接,例如:https://github.com/someuser/someRepo.git 单击设置选项卡。

你首先看到的是你的回购名称,你可以编辑它。

注意:-如果你在本地克隆了repo,手动更改它的文件夹名,就这样。

It is worth noting that if you fork a GitHub project and then rename the newly spawned copy, the new name appears in the members network graph of the parent project. The complementary relationship is preserved as well. This should address any reservations associated with the first point in the original question related to redirects, i.e. you can still get here from there, so to speak. I, too, was hesitant because of the irrevocability implied by the warning, so hopefully this will save others that delay.

重命名GitHub存储库如下:

登录您的http://github.com帐户。 浏览到要重命名的存储库。 单击设置。 “Repository Name”设置为修改后的名称。 点击重命名。

在此步骤之后,您的在线存储库将与您的本地文件夹名称匹配。

您可能还想重命名本地文件夹。手动执行此操作,并使用GitHub Windows客户端来查找您的存储库。重命名本地副本,它将再次匹配GitHub。