第一步:设置代理(如果不需要设置代理,跳过改步)
git config --global http.proxy http://user:password@ip:port
git config --global https.proxy https://user:password@ip:port
如果不需要密码
git config --global http.proxy http://ip:port
git config --global https.proxy https://ip:port
第二步:在gitbub上创建工程
第三步:根据提示,输入命令
git init git add README.md git commit -m "first commit" git remote add origin https://github.com/ht00001/test.git git push -u origin master
第四步:取消代理:
git config --global --unset http.proxy
git config --global --unset https.proxy