提交到github報錯Please tell me who you are
阿新 • • 發佈:2017-10-11
global bject config count tel xxx hub his 所在
*** Please tell me who you are.
Run git config --global user.email "[email protected]" git config --global user.name "Your Name" to set your account‘s default identity. Omit --global to set the identity only in this repository
- git config --global user.email "[email protected]"
- git config --global user.name "Your Name"
--------------------------------------
上面的方法配置的是全局的用戶名和郵箱!就是說如果沒有單獨為項目配置,那提交的所有項目全部都是這個名字和郵箱!不管是公司項目還是github,還是碼雲!很蛋疼有木有,當碼雲提交記錄上出現我名字的時候我都驚呆了!
單獨為項目配置的方法(全局和單獨配置都存在的時候會默認使用項目單獨配置的):
1.打開項目所在目錄,找到隱藏的.git文件夾。註意這個文件夾是隱藏的,顯示隱藏出來就行。
2.打開文件夾裏的config文件,推薦用nodepad++打開。
3.添加這三行到文件:
[user]
name = XXX(自己的名稱)
email = XXXX(郵箱)
當然也可以通過命令行的方式,只需要在 .git 文件夾下。 例如執行如下命令:
git config user.name "xxxxx"
提交到github報錯Please tell me who you are