文章版本: Enterprise Server 2.17
重命名仓库
如果您是组织所有者或拥有仓库的管理员权限,则可以重命名仓库。
When you rename a repository, all existing information, with the exception of project site URLs, is automatically redirected to the new name, including:
- 议题
- Wikis
- 星标
- 关注者
For more information on project sites, see "About GitHub Pages."
In addition to redirecting web traffic, all git clone
, git fetch
, or git push
operations targeting the previous location will continue to function as if made on the new location. However, to reduce confusion, we strongly recommend updating any existing local clones to point to the new repository URL. You can do this by using git remote
on the command line:
$ git remote set-url origin new_url
For more information, see "Changing a Remote's URL."
提示:只有拥有组织所有者权限或仓库管理员权限的成员才能重命名仓库。 更多信息请参阅“组织的仓库权限级别”。
Warning: If you create a new repository under your account in the future, do not reuse the original name of the renamed repository. If you do, redirects to the renamed repository will break.
- 在 GitHub Enterprise 上,导航到仓库的主页面。
- 在仓库名称下,单击 Settings(设置)。
- 在 Repository Name(仓库名称)标题下,输入仓库的新名称。
- 单击 Rename(重命名)。 您已完成!