LoginSignup
1
0

仕事用のアカウントから、私用のアカウントに変更したい

以下のコマンドで変更できる。

git config user.name "名前"
git config user.email GitHubアカウントのアドレス

※ユーザー名はダブルクォーテーションで囲み、メールは囲まない

git config user.name "shiyou"
git config user.email shiyou@email.com

適当な名前・メールに変更してコミットしたらどうなる?

問題なくコミットできる。

以下スクショのように、GitHub画面上には user.email に紐づくGitHubアカウントのユーザー名が表示される。
GitHubアカウントに紐づかないメールアドレスを指定していた場合は user.name で指定した名前がそのまま表示された。

shot240303-1.png

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0