github怎么用

1.解决打不开github的问题

参考https://www.cnblogs.com/july-sunny/p/13697156.html
https://www.cnblogs.com/iupoint/p/14552968.html
更改hosts文件,在后面加入,host文件的目录:C:WindowsSystem32driversetc

#github
199.232.69.194 github.global.ssl.fastly.net
140.82.113.4 github.com
185.199.108.153    assets-cdn.github.com
185.199.110.153    assets-cdn.github.com
185.199.111.153    assets-cdn.github.com

更新dns,打开cmd,输入ipconfig /flushdns
再ping一下,ping github.com

2.github的使用

参考:https://blog.csdn.net/ling_mochen/article/details/79672736
先在本地创建一个仓库(也就是文件夹)

git config --global user.name xxx
git config --global user.email xxx@xxx.com
git init

上传到github

git remote add origin https://github.com/xxx/xxx.git
git push -u origin master

3.git clone 和git pull的区别

参考博客:https://blog.csdn.net/lijing742180/article/details/84636977/
git clone是本地版本库从无到有的过程
git pull是从远程版本库获取最新版本并且合并到本地
使用:如果本地还没有版本库就先clone,有了版本库后,每次上传到远程,就要先git pull,防止版本冲突。
先写这些,挖个坑xixi

作者:inss!w!
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
原文地址:https://www.cnblogs.com/Hfolsvh/p/15435540.html