【git】Git commit時提示錯誤時 解決辦法

opensmarty發表於2024-04-02
* 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
解決辦法:
開啟終端,進入自己的專案下,有個.git目錄
cd ~/MyPro/.git
vi config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
#新增以下三行:
[user]
email = yourname@me.com
name = yourname

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

相關文章