====== Windows上git的配置====== 在Windows上使用git需要一些特殊的配置. git config --global user.name "pjq" git config --global user.email "pengjianqing@gmail.com" 最近从github.com上clone代码,没做任何修改用git status查看状态,就会发现有些文件被自动修改了,但实际上我没有做任何修改. 出现这个问题就是crlfd做怪了,需要用下面的命令将它转为false git config --global core.autocrlf false 如果要查看当前的配置: git config -l $ git config -l core.symlinks=false core.autocrlf=true color.diff=auto pack.packsizelimit=2g help.format=html http.sslcainfo=/bin/curl-ca-bundle.crt sendemail.smtpserver=/bin/msmtp.exe user.name=Percy Peng user.email=Percy.Peng@qisda.com core.autocrlf=false ====== 参考 ====== http://hi.baidu.com/d_life/blog/item/c5ef6e823a3b93b46c8119c5.html ====== Gentoo上git ====== 我需要在宿舍电脑上也能够clone代码,这就需要添加另外一个key了。 参考:http://help.github.com/linux-key-setup/ 之前如果已经存rsa的话,需要先记着备份。 创建命令: ssh-keygen -t rsa -C "pengjianqing@gmail.com" 然后将id_rsa.pub添加到github帐户中去。 然后我想着这个时候应该可以clone了吧,试了下不行, Cloning into DellStage... Agent admitted failure to sign using the key. Permission denied (publickey). fatal: The remote end hung up unexpectedly 这个时候还需要将这个生成的key添加到系统中去, ssh-add id_rsa 再clone一下,OK了。