Skip to main content

このバージョンの GitHub Enterprise サーバーはこの日付をもって終了となります: 2025-03-05. 重大なセキュリティの問題に対してであっても、パッチリリースは作成されません。 パフォーマンスの向上、セキュリティの向上、新機能の向上を図るために、最新バージョンの GitHub Enterprise サーバーにアップグレードしてください。 アップグレードに関するヘルプについては、GitHub Enterprise サポートにお問い合わせください

Setting your username in Git

Git uses a username to associate commits with an identity. The Git username is not the same as your GitHub username.

Platform navigation

About Git usernames

You can change the name that is associated with your Git commits using the git config command. The new name you set will be visible in any future commits you push to GitHub from the command line. If you'd like to keep your real name private, you can use any text as your Git username.

Changing the name associated with your Git commits using git config will only affect future commits and will not change the name used for past commits.

Setting your Git username for every repository on your computer

  1. [ターミナル][ターミナル][Git Bash] を開きます。

  2. Git のユーザー名を設定してください:

    git config --global user.name "Mona Lisa"
    
  3. Git のユーザ名が正しく設定されたことを確認します:

    $ git config --global user.name
    > Mona Lisa
    

Setting your Git username for a single repository

  1. [ターミナル][ターミナル][Git Bash] を開きます。

  2. Change the current working directory to the local repository where you want to configure the name that is associated with your Git commits.

  3. Git のユーザー名を設定してください:

    git config user.name "Mona Lisa"
    
  4. Git のユーザ名が正しく設定されたことを確認します:

    $ git config user.name
    > Mona Lisa
    

Further reading