Home  >  Article  >  Development Tools  >  How to change github name

How to change github name

PHPz
PHPzOriginal
2023-04-06 09:19:073629browse

On Github, the username is unique and cannot be changed, so if you want to change your Github username, you need to create a new account and migrate the previous projects and related content to the new account. Below we will introduce the specific steps:

  1. Create a new Github account

When registering a new account, you need to ensure that the username meets your personal needs and is available. After successful registration, you need to click the gear-shaped button next to the "Profile" page and the "Settings" tab to enter the account settings.

  1. Migrate projects and related content

In the new account, create the same warehouse as the previous account, and use the command line or other Git client to migrate the original project Push the folder to the warehouse under the new account:

git remote add neworigin git@github.com:<new_github_username>/<new_repo_name>.git
git push --mirror neworigin

The above command will push all the contents in the original project folder (including submission history, branches, etc.) to the warehouse under the new account.

  1. Change user information

In the "Profile" page, click "Edit profile" to edit the profile.

Here, you can edit the user’s nickname, email, company, personal website and other information.

  1. Notify relevant people and organizations

If you have shared projects or participated in collaborations in organizations or projects before, you need to notify relevant people and organizations in time to ensure that this does not happen Confusion or cooperation suffers.

Summary:

Through the above steps, you can successfully modify the Github user name and migrate related content. It is important to note that before migrating a project, you need to ensure that the original project has been backed up to avoid data loss.

The above is the detailed content of How to change github name. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn