1.)登陆git账号
https://github.com
2)创建远程仓库
3)打开终端输入命令git bash
cd到你的本地项目根目录下,执行如下git命令
git init
git add .
git commit -m "init"
git remote add origin https://github.com/yunxingluoyun/PRSD.git
git push -u origin master
报错:
$ git push -u origin master
fatal: unable to access 'https://github.com/yunxingluoyun/PRSD.git/': Failed to connect to github.com port 443 after 21080 ms: Timed out
解决方法:
设置全局代理
git config --global http.proxy http://127.0.0.1:10809
git config --global https.proxy http://127.0.0.1:10809
取消全局代理
git config --global --unset http.proxy
git config --global --unset https.proxy
参考: https://www.cnblogs.com/mantou811/p/6688517.html https://blog.csdn.net/Hodors/article/details/103226958
|