Git的导入
By Xchen 20160624
Git的安装
在最新的Mac和Linux系统中都是预装了Git的,在Windows中最简单的安装方法就是msysGit下载地址
设置环境变量为:use git bash only
换行符设置为自动转换:checkout window-style,commit unix-style line endings
初始设置
- 设置姓名和邮箱地址:
git config –global user.name “Firstname Lastname”
git config –global user.email “your_email@example.com”- 设置颜色属性来提高可读性
git config –global color.ui auto
在~/gitconfig文件中显示:
[user]
—-:|name = Firstname Lastname
email = your_email@example.com
[color]
ui = auto
使用Github的前期准备
- 创建Github账户
- 设置头像
- 设置SSH Key
执行 ssh-keygen –t rsa –C “your_email@example.com”
其中:id_rsa文件是私有密钥,id_rsa.pub文件是公开密钥。- 添加公开密钥
Account Setting——SSH Key——Title中输入密钥名称——Key中粘贴id_rsa.pub文件中的内容- Follow关注别人,Watch其他仓库