0
0

More than 1 year has passed since last update.

git commit時に"*** Please tell me who you are."と言われた時の対処法

Last updated at Posted at 2022-09-27

docker/laravelを学習中に一瞬詰まったので備忘録として残します。

エラー内容

〇〇@〇〇MacBook-Pro docker-laravel-handson % git commit -m "feat create docker app container"

#ここからエラーメッセージ↓
Author identity unknown

*** Please tell me who you are.

Run

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

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got '○○@○○noMBP.(none)')

調べると、参考になる記事がありました。

グローバル設定のuser.useConfigOnlyをtrueにすることで、グローバル設定も含め明示的にuser.name・user.email指定していないとコミットができなくなります。
"https://dev.classmethod.jp/articles/git-use-config-only/"

まとめ

社内開発、個人開発を同時並行で行う際はアカウントの切り分けができるので便利だと思いました。逆にどちらか一方の場合は特に意識することがなさそうなので、configで設定してしまった方が楽ですね。

"Git公式ページ"

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