git未配置全局user.name和user.email時,commit會提示配置:
>git commit -m "Initial commit"
*** 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 'user@DESKTOP-FFEE.(none)')
如果不想配置全局或由于多賬號不能配置全局時卜壕。可以配置單倉庫名字和郵箱:
>git config --local user.name "your name"
>git config --local user.email "email@email.com"
查看倉庫配置信息:
>git config --local --list