安装
进入Git官网,下载安装软件,手动安装
使用流程
# 初始化
git init
# 添加到本地库
git add filaName
git commit -m "first commit" filaName
# 给自己github的仓库地址取一个别名
git remote add origin git@github.com:kernstarc/demo.git
# 上传
git push origin master
# 下载合并本地代码
git pull
# 下载到本地
git clone
SSH key
BUG
Permission denied (publickey). fatal: Could not read from remote repository.
解决方案
(删除当前key),然后重新生成key:
$ ssh-keygen -t rsa -C "你的GitHub注册邮箱"
开发ssh key setting
$cat ~/.ssh/id_rsa.pub
把上一行代码显示的key字符串,复制到github的ssh key setting制定文本框即可。
然后点击确定,可以正常使用。