Git 上传gitHub
VPN这个鬼搞死我。。。
不连vpn ping不同github, 连上vpn给我开局域网代理。
这么一顿操作下来,是解决了。都可以试试…
设置局域网代理
网络&Internet 设置
使用代理服务器 取消勾选
防火墙
防火墙关闭
配置hosts文件
参考大佬:https://blog.csdn.net/qq_42102911/article/details/121485672
1.首先打开 ipaddress.com 网站,查询以下网址对应地IP
网站地址 :https://websites.ipaddress.com/
需要查询地网址ip
1、github.com
2、github.global.ssl.fastly.net
2.复制查询后地ip,然后在hosts文件中做出相应地修改(hosts文件路径:C:\Windows\System32\drivers\etc)
3. 修改后保存退出,在cmd命令行执行刷新命令
ipconfig /flushdn
配置config文件
git config --global user.name "这里换上你的用户名"
git config --global user.email "这里换上你的邮箱"
git config --global -e
##把你那个http https都删了,url填ssh的
git config --local -e
##把你那个http https都删了,url填ssh的
ssh配置
本地:
- 打开git bash
cd ~/.ssh
ls
没有文件的话执行
ssh-keygen -t rsa -C “这里换上你的邮箱”
三次Enter
生成文件
cat id_rsa.pub
复制 - 打开你的github网站,右上角头像-setting-ssh
添加ssh
标题起一个(最好最后加上时间)
粘贴创建
Git 冲突
<<<<<<< HEAD
new new new new code
=======
old old old code
>>>>>>> xxxxxxxxxxxxxxxxxxxxxxx
分析:head 到 =======里面的lalala是自己的commit的内容
=========到 >>>>>>里面的hehehe是下拉的内容
根据需要删除代码就行了
完事把<<<<<<< ======= >>>>>>
都删掉冲突就解决了