坑已踩过,请放心食用。
GitHub 漫游记系列
下载 git
Ubuntu
sudo apt-get install git-core
Windows
访问https://gitforwindows.org/
文件类似 Git-2.22.0-64-bit.exe
双击打开
接下来按图所示
之后选择安装路径安装即可
ps:一定要记住选择的安装路径,整合IDE的时候需要使用
配置
创建身份
安装完成后 打开控制台 输入
git config --global user.name 你的名字
git config --global user.email 你的邮箱
通过输入命令
git config --global user.name
git config --global user.email
看返回值是否是你设置的值来验证配置是否成功
生成密匙
输入 ssh-keygen -t rsa -C 你的邮箱
找到上图所示的 id_rsa.pub
文件 文本方式打开即可看见你的密匙
ps:你的密匙需要记住,整合GitHub时候需要使用