0
0

Gitでコミットしようとしたら、'user.name' と 'user.email' の設定が必要だと言われて、コミットできません。どうすればいいですか?

Posted at

"Make sure you configure your ‘user.name’ and ‘user.email’ in git" というエラーが表示されるのは、Gitの設定が正しく行われていないためです。これを解決するためには、Gitの設定を行う必要があります。以下の手順で設定できます。

Gitの設定手順

  1. Git Bashを開く(またはターミナル):

    • Windowsの場合は「Git Bash」や「PowerShell」など。
    • macOSやLinuxの場合は「Terminal」。
  2. ユーザー名とメールアドレスを設定する:
    以下のコマンドを実行して、ユーザー名とメールアドレスを設定します。これらはあなたのGitのコミットに使用されます。

    git config --global user.name "Your Name"
    git config --global user.email "your.email@example.com"
    

    ここで Your Nameyour.email@example.com をあなたの名前とメールアドレスに置き換えてください。

  3. 設定が反映されたことを確認する:
    設定が正しく反映されているか確認するために、以下のコマンドを実行します。

    git config --global --list
    

    これで、user.nameuser.email が設定されていることが確認できるはずです。

0
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
0
0