标签:
Git提供了适用于Linux, Windows, OSX的客户端, 本节以Windows为例介绍基本安装与配置。
所需工具:msysgit, kdiff3.
在Windows Explorer任意目录下,右键菜单选择Git bash here,进入Git command prompt.
配置身份信息:
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
配置合并工具:
$ git config --global merge.tool kdiff
$ git config --global mergetool.kdiff3.path "your path to kdiff3.exe"
根据提示配置ssh:
$ ls ~/.ssh
$ ssh-keygen -t rsa -b 4096 -C "your-email@example.com"
$ ssh-agent -s
$ ssh-add ~/.ssh/id_rsa
$ clip < ~/.ssh/id_rsa.pub
例如在github中可以在profile->personal settings中可以找到 SSH Keys菜单:
至此基本配置完成,可以使用预配置的身份clone仓库,提交代码,以及更多。
Begin using git (Part1) - Git的安装与配置
标签:
原文地址:http://www.cnblogs.com/500error/p/begin-using-git-part-1.html