可使用命令配置git
//配置不提交文件权限git config core.fileMode false
在用户目录下(~),编辑 .gitconfig文件:
[user]name = xxxxemail = xxx@163.com[alias]co = checkoutci = commit -ast = statusbr = branchoneline = log --pretty=oneline --since='2 days ago'onelog = log -p -1[color]diff = autostatus = autobranch = autoui = auto[remote "origin"]url = https://you:password@github.com/you/example.git //配置用户名密码[core]fileMode = false //配置不提交文件权限 默认为 ture
1.告知服务器自己的名字,让他知道这些操作是你做的
$git config –global user.name “你的名字”
2.告知服务器自己的邮箱地址,服务器通过这个来将你提交的代码联系到你的git账户
$git config –global user.email “你的Email地址”
(注意:这里填写的Email地址最好和你的git帐号Email相同)
3.最后,如果你不想每次在提交代码的时候都输入帐号密码的话,需要以下的配置:
$git config –global credential.helper cache
(开启credentialhelper,证书/凭证助手,这样github才能在内存中保存你的信息)
$git config –global credential.helper 'cahe –timeout=3600'
(这样,github就会保存你的帐号密码1个小时)