提交到github報錯Please tell me who you are

*** Please tell me who you are. node

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 repositorygit

  1. git config --global user.email "you@example.com"  
  2. git config --global user.name "Your Name"

--------------------------------------github

上面的方法配置的是全局的用戶名和郵箱!就是說若是沒有單獨爲項目配置,那提交的全部項目所有都是這個名字和郵箱!無論是公司項目仍是github,仍是碼雲!很蛋疼有木有,當碼雲提交記錄上出現我名字的時候我都驚呆了!ide

 

單獨爲項目配置的方法(全局和單獨配置都存在的時候會默認使用項目單獨配置的):this

1.打開項目所在目錄,找到隱藏的.git文件夾。注意這個文件夾是隱藏的,顯示隱藏出來就行。spa

2.打開文件夾裏的config文件,推薦用nodepad++打開。命令行

3.添加這三行到文件:code

 

[user] name = XXX(本身的名稱) email = XXXX(郵箱)

 

固然也能夠經過命令行的方式,只須要在 .git 文件夾下。 例如執行以下命令:string

git  config  user.name "xxxxx"
相關文章
相關標籤/搜索