将 github 用户更改为组织

Changing github user to organization

所以,这可能是一个愚蠢的问题,但是,我们的客户依赖于我们的一些 public 存储库,我指的是 github 公司的用户。它是很久以前制作的,现在我们正在考虑转换为组织(对于机器用户等等),但我们不确定这样做的后果。

谁能告诉我回购是否有任何变化?

主要后果是远程存储库 URL 将发生变化,这意味着客户端将需要更新他们拥有的本地副本的 'origin'。

由于当存储库从个人移动到组织时,历史记录不会发生变化,他们将没有任何其他事情可做。

cd /path/to/local/clone/of/repo
git remote set-url origin https://github.com/<newOrg>/<aRepo.git>

2022:不变,见最后一节。

rob006 adds , it is not needed at first, Since GitHub will redirect the URL of the old repo to the new one, since May 2013.
但是如果重新创建相同的用户 repo,那么客户端就会有问题。


警告 (2022):jmon12 notes in that the URL does not change. From this thread

When converting an individual account into an organization, the repositories do not move.
Do keep in mind, while transforming the account to an organization, you will be required to designate a another user account as an organizational owner.