GitHubでメールアドレスをプライベートにする
- https://github.com/settings/emails へアクセスする
- 「Keep my email addresses private」(2022/08/11現在の文言)をチェックする
これでGitHubからマージや編集などのGitの操作をしたときのメールアドレスが ID+username@users.noreply.github.com
になる。ローカルでしたコミットに紐づくメールアドレスも他のユーザーからわからないようにするために ID+username@users.noreply.github.com
に変更する。
$ git config --global user.email "ID+username@users.noreply.github.com"
$ git config --global user.email
ID+username@users.noreply.github.com