最近升級了Xcode7
,一打開老工程就各種報警告,由于我潔癖癌晚期,一定要從本質上消滅掉警告心里才舒坦,幾個小警告,秒秒鐘搞定,最后把工程配置文件也升級了,run起來沒有警告那叫一個爽啊,舒坦!!!
然后,過了幾天,commit的時候出現這逼提示:
The working copy “***” failed to commit files.
*** 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 '***@bogon.(none)')
對于戰五渣的我來說,一般這種提示我都會先找我大Google
,結果瞄了一眼,機智的我發現能看懂按照上述提示,那就按照提示跑一遍吧,結果是,跑了N遍還還是照提示不誤,雖然很確定是Xcode7
的問題,但是捉急的我還是用Github
的客戶端直接commit
了。
前面的直覺告訴我是Xcode7對于本地倉庫上的問題。但是,這兩天打開遠程倉庫提交也是同一個逼樣,一下就把哥給激怒了,配置全局沒鳥用,那就只能單獨本地配置用戶名和郵箱地址了。果斷切換到當前項目
工程目錄下,執行:
cd {project_path}/.git/
修改配置文件:
vi config
添加如下字段:
[user]
name = Your Name
email = you@example.com
或者在工程根目錄執行一下命令也是同樣效果:
git config --local user.name "Your Name"
git config --local user.email "you@example.com"
不得不說,每次新版本都不讓人剩下,好了,打完收工。。。