【Tools】Windows下Github的配置和使用

1、在网址:http://windows.github.com/下载git软件,具体的安装步骤可以参见:Windows 系统下Git安装图解

2、同样根据上面的教程生成SSH key;

3、将public key复制粘贴到GitHub等git托管服务器;

4、客户端:使用SourceTree,初次clone项目的时候可以用Git GUI等方式,其中,SourceTree总是会提示认证失败,解决方案如下:

I usually use ssh.exe provide by git distribution, for some reason SourceTree rely on putty which have is own private key format (.ppk).
To make it works I took my private key (id_rsa) convert it into ppk (id_rsa.ppk) using menu :
1. Tools=>Create or Import SSH key, Then click on Load Button and load the private key (id_rsa).
2. Click on "Save private key" as id_rsa.ppk
3. Then got to Tools => Option, under ssh key field set the new ppk.

然后Retry一下就可以了。

5、Windows是不允许建立.gitignore文件的,Windows把该文件名的文件当做是没有名字只有后缀名的文件,为什么不准这样的文件呢?(Such files are considered to have an extension but no name. If the extension is known and the user has chosen to hide known extensions, the resulting file would have no name at all!

建立方式如下(当然你可以去已有的项目中复制一个过来):

进入命令行,在cmd里面进入要建立文件的文件夹下,输入命令“echo > .gitignore”的方法即可建立。

posted @ 2013-12-22 13:59  大脚印  阅读(1118)  评论(0编辑  收藏  举报