コミットメールアドレスについて
GitHub uses your commit email address to associate commits with your account on GitHub.com. コマンドラインからプッシュするコミットや、WebベースのGit操作に関連づけられるメールアドレスは選択できます。
For web-based Git operations, you can set your commit email address on GitHub.com. コマンドラインからプッシュするコミットについては、Git のコミットメールアドレスを設定できます。
コミットメールアドレスの変更前に行ったコミットは、変更前のメールアドレスに関連づけられたままとなります。
参考:使い捨てのメールアドレスサービス(一定期間後に期限切れになる一時的なアドレスでメールを受信できるようにしてくれるサービス)からのメールアドレスは検証できません。 メールアドレスをプライベートにしておきたいなら、GitHub が提供するnoreply
メールアドレスを使ってください。 詳しい情報については「GitHubでのコミットメールアドレスの設定」を参照してください。
If you'd like to keep your personal email address private, you can use a no-reply
email address from GitHub Enterprise Cloud as your commit email address. コマンドラインからプッシュするコミットに対してnoreply
メールアドレスを使いたい場合には、そのメールアドレスを Git のコミットメールアドレスの設定で使用してください。 Web ベースの Git 操作に noreply
アドレスを使いたい場合には、GitHub でコミットメールアドレスの設定を行い、[Keep my email address private] を選択してください。
また、個人のメールアドレスを公開するコマンドラインからプッシュされたコミットをブロックするよう選択することもできます。 詳細は「個人のメールを公開するコマンドラインプッシュのブロック」を参照してください。
To ensure that commits are attributed to you and appear in your contributions graph, use an email address that is connected to your account on GitHub.com, or the noreply
email address provided to you in your email settings. 詳しい情報については、「GitHub アカウントにメールアドレスを追加する」を参照してください。
Note: If you created your account on GitHub.com after July 18, 2017, your no-reply
email address for GitHub Enterprise Cloud is a seven-digit ID number and your username in the form of ID+username@users.noreply.github.com
. If you created your account on GitHub.com prior to July 18, 2017, your no-reply
email address from GitHub Enterprise Cloud is username@users.noreply.github.com
. You can get an ID-based no-reply
email address for GitHub Enterprise Cloud by selecting (or deselecting and reselecting) Keep my email address private in your email settings.
If you use your noreply
email address for GitHub Enterprise Cloud to make commits and then change your username, those commits will not be associated with your account on GitHub.com. This does not apply if you're using the ID-based noreply
address from GitHub Enterprise Cloud. 詳細は「GitHub ユーザ名を変更する」を参照してください。
GitHub のコミットメールアドレスを設定する
メールアドレスのプライバシーを有効化していないなら、
GitHub Enterprise Cloud上のファイルの編集、削除、作成あるいはPull Requestのマージの変更を作成する検証済みのメールアドレスを選択できます。 メールアドレスのプライバシーを有効化しているなら、コミット作者のメールアドレスは変更できず、デフォルトで<username>@users.noreply.github.com
になります。
-
任意のページの右上で、プロフィール画像をクリックし、続いてSettings(設定)をクリックしてください。
-
In the "Access" section of the sidebar, click Emails.
-
"Add email address(メールアドレスの追加)"でメールアドレスを入力してAdd(追加)をクリックしてください。
-
"Primary email address(プライマリメールアドレス)"リストで、WebベースのGit操作と関連づけたいメールアドレスを選択してください。
-
WebベースのGit操作をする際にメールアドレスをプライベートに保つには、Keep my email addresses private(メールアドレスをプライベートに保つ)をクリックしてください。
Git のコミットメールアドレスを設定する
git config
コマンドを使用して、Git コミットに関連付けられているメールアドレスを変更できます。 設定した新しいメールアドレスは、コマンドラインから GitHub.com にプッシュするこれからのコミットに表示されます。 コミットメールアドレスを変更する前のコミットは、まだ過去のメールアドレスに関連付けられます。
コンピュータにあるすべてのリポジトリ用にメールアドレスを設定する
- ターミナルターミナルGit Bashを開いてください。
- Gitでメールアドレスを設定してください。 GitHub Enterprise Cloudが提供する
no-reply
メールアドレスもしくは任意のメールアドレスが利用できます。$ git config --global user.email "email@example.com"
- Git で正しくメールアドレスが設定されたことを確認してください。
$ git config --global user.email email@example.com
- Add the email address to your account on GitHub Enterprise Cloud, so that your commits are attributed to you and appear in your contributions graph. 詳しい情報については「GitHubアカウントへのメールアドレスの追加」を参照してください。
単一リポジトリ用にメールアドレスを設定する
GitHub Enterprise Cloud uses the email address set in your local Git configuration to associate commits pushed from the command line with your account on GitHub.com.
単一のリポジトリで作成するコミットに関連するメールアドレスを変更できます。 This will override your global Git configuration settings in this one repository, but will not affect any other repositories.
- ターミナルターミナルGit Bashを開いてください。
- 現在のワーキングディレクトリを Git コミットと関連付けたメールアドレスを設定したいローカルリポジトリに変更します。
- Gitでメールアドレスを設定してください。 GitHub Enterprise Cloudが提供する
no-reply
メールアドレスもしくは任意のメールアドレスが利用できます。$ git config user.email "email@example.com"
- Git で正しくメールアドレスが設定されたことを確認してください。
$ git config user.email email@example.com
- Add the email address to your account on GitHub Enterprise Cloud, so that your commits are attributed to you and appear in your contributions graph. 詳しい情報については「GitHubアカウントへのメールアドレスの追加」を参照してください。