【原创】Windows平台下Git的安装与配置

一、下载     msysgit是Git for Windows版,其Home Page为:
http://msysgit.github.io/ 点击页面中“Download”进入下载列表。可根据个人喜好选择下载版本。这里选择下载最新版:Git-1.8.3-preview20130601.exe. 二、安装     下载完毕,双击开始安装:     1、除了AdvancedXXX选项,其余全选中    
《【原创】Windows平台下Git的安装与配置》     2、选择“Use Git Bash only”
《【原创】Windows平台下Git的安装与配置》     3、选择“Checkout as-is,commit as-is”
《【原创】Windows平台下Git的安装与配置》     4、等待安装完毕。 三、配置     1、安装完毕,桌面上会有Git Bash图标
《【原创】Windows平台下Git的安装与配置》,双击进入Git Shell界面
《【原创】Windows平台下Git的安装与配置》       2、配置Name和Email         命令格式:    git config –global user.name “your name”                        git config –global user.email “your email address” 
《【原创】Windows平台下Git的安装与配置》     3、生成Public/Private RSA Key         命令格式:    ssh-keygen -C “your email address” -t rsa
《【原创】Windows平台下Git的安装与配置》         注意图中红色数字标注:         1、设置Public RSA Key的保存位置,直接回车采用默认地址;         2、设置一个密码,并再次输入确认(
这里不建议设置,方便本地使用)         3、Public RSA Key的保存路径:c:\users\username\.ssh\id_rsa.pub     4、将Public Key告知Github         请首先注册一个github账号,Home Page:
https://github.com/ 。然后进入Account Settings页面,打开SSH Keys,点击“Add SSH Key”。打开c:\users\username\.ssh\id_rsa.pub,把里面的内容全部Copy到Key对应的输入框内,点击“Add Key”。
《【原创】Windows平台下Git的安装与配置》 四、Clone Repositories     1、进入Git Workspace,右键选择Git GUI Here:
《【原创】Windows平台下Git的安装与配置》     2、选择“克隆已有版本库”
《【原创】Windows平台下Git的安装与配置》     3、输入要克隆的版本库地址和保存目录。
《【原创】Windows平台下Git的安装与配置》                  需要注意的是:1、版本库地址格式:git@github.com:your resp address;2、保存目录的最后一级不能Exist;3、图中蓝线标注即为your resp address,可以在github.com的Account Settings–>Respositories中看到,如下图红圈所示。
《【原创】Windows平台下Git的安装与配置》       4、根据提示输入密码(在第三节的第三项中所设置),可能会输入多次。
《【原创】Windows平台下Git的安装与配置》       5、Clone成功。
《【原创】Windows平台下Git的安装与配置》 五、简化     第四节中介绍的方法比较复杂,尤其是频繁输入密码。下面介绍一种简单的方法:     1、一定不要设置密码!!!     2、在Git Workspace打开Git Bash Here     3、输入ssh git@github.com 回车,出现如下提示表示已经信任
git@github.com站点。
《【原创】Windows平台下Git的安装与配置》  
——2013.8.19 写于北京

    原文作者:陌上幽人
    原文地址: https://www.cnblogs.com/monodin/p/3268679.html
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞