1,下载和安装Git
GitHub的核心是一个叫做Git的开源版本控制系统(VCS),被开发Linux的团队所创建。Git负责一切GiHub有关本地计算机的所有事物。
2,配置Git
UserName
$ git config --global user.name "Your Name Here"
# Sets the default name for git to use when you commit
$git config --global user.email "your_email@example.com"
# Sets the default email for git to use when you commit
这里推荐填写注册GitHub时的邮箱,增加额外的邮箱参考 向导
Password caching 密码缓存
设置该项是为了与远程server的交互不用每次都输入用户名和密码,需要证书和Git版本1.7.10以上
要使用该选项,必须打开credential helper以至于git将密码保存到内存中一段时间
$git config --global credential.helper cache
# Set git to use the credential memory cache
git缺省缓存密码15分钟,你可以自定义时间
$git config --global credential.helper 'cache --timeout=3600'
# Set the cache to timeout after 1 hour (setting is in seconds)
PS:credential helper只对https格式的URL有效,如果使用ssh的方式可参照向导