git和github 使用指南

git 安装后  

$ git config --global user.name "输入你的用户名"
$ git config --global user.email "输入你的邮箱"

git status  git add. git commit -m  状态,提交 备注提交信息

 

git remote add origin url 

git pull origin master  pull代码

git push -u origin master 空项目的时候,提交代码

建分支

 

git branch
git branch a

git checkout a

git pull origin a

github 因为是外国网站,有时候无法访问,所以设置ip

#github
192.30.253.113 github.com
192.30.253.113 github.com
192.30.253.118 gist.github.com
192.30.253.119 gist.github.com

192.30.253.112 github.com
192.30.253.113 github.com
192.30.252.128 github.com
192.30.253.118 gist.github.com
192.30.253.119 gist.github.com
151.101.113.194 github.global.ssl.fastly.net

设置密钥


git ssh
ssh.keygen -t rsa 

 

验证证是否授权成功 ssh -T git@github.com

 

posted @ 2018-08-08 11:57  柳州园几声鸣蝉?  阅读(125)  评论(0编辑  收藏  举报