執行 git commit 時報:
*** Please tell me who you are. Run: git config --global user.email "you@example.com"; git config --global user.name "Your Name"
原因:Git 需要提交者身份信息記錄在提交對象中,首次使用必須配置。
git config --global user.email "your@email.com"
git config --global user.name "Your Name"
--global:當前用戶所有倉庫生效。--global:僅當前倉庫生效(在倉庫根目錄執行)。git config --list | grep user
配置後即可正常提交。建議閱讀《Git 权威指南》或廖雪峰 Git 教程系統入門。