githubgithub-organizations

Changing github user to organization


So, this might be a stupid question but, our clients depend on some of our public repos, by ours I mean the github user of the company. It was made a long time ago, and now we are considering converting to organization (for machine users and whatnot) but we are not sure about the consequences of doing this.

Can anyone tell me if the repos suffer any kind of change?


Solution

  • The main consequence is the remote repository URL will change, which means the clients will need to update their 'origin' of the local copy they have.

    Since the history will not have changed when the repository moves from personal to organization, they won't have anything else to do.

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

    2022: it does not change, see the last section.

    As rob006 adds in the comments, it is not needed at first, Since GitHub will redirect the URL of the old repo to the new one, since May 2013.
    But if the same user repo is recreated, then the clients will have an issue.


    Warning (2022): jmon12 notes in the comments 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.