- 参考学习站点廖雪峰:Git教程 - 廖雪峰的官方网站
- 安装git,分布式版本管理系统
创建的项目目录下,
git bash
初始化生成.git, 就是创建版本库,就是一个文件,该文件下会被git管理
git init
- who you are?
git config --global user.name "Your Name" git config --global user.email "email@example.com" eg: git config --global user.name "晁阳" git config --global user.email "2279679717@qq.com"
- 提交代码
(1)add git add hello.js //此时只是放到了暂存区,git add * (2)commit git commit -m '描述' //此时提交到版本库,进行管理master
- 远程仓库
ssh-keygen -t rsa -C "youremail@example.com"//已经生成pub秘钥 1--GitHub上 echo "# -" >> README.md git init git add README.md git commit -m "first commit" git remote add origin https://github.com/cy2zq/-.git git push -u origin master
git clone 慢,--depth 1
git clone https://github.com/cy2zq/arthas.git --depth 1
查询git IP。点击链接,查询IP
找到IP直接访问,应该能迅速进入才对
修改host --事例如下所示
140.82.114.4 github.com