第一步:设置代理(如果不需要设置代理,跳过改步)

     git config --global http.proxy http://user:[email protected]:port

     git config --global https.proxy https://user:[email protected]:port

     如果不需要密码

     git config --global http.proxy http://ip:port

     git config --global https.proxy https://ip:port


第二步:在gitbub上创建工程将本地代码上传到github,代理和设置和取消

第三步:根据提示,输入命令

	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

将本地代码上传到github,代理和设置和取消

第四步:取消代理:

   git config --global  --unset  http.proxy

  git  config --global  --unset  https.proxy

相关文章:

  • 2021-11-12
  • 2021-06-01
  • 2021-07-09
  • 2021-06-14
  • 2022-01-07
  • 2022-01-07
猜你喜欢
  • 2022-01-07
  • 2021-11-09
  • 2021-05-16
  • 2022-01-07
  • 2021-10-20
  • 2022-01-07
  • 2022-01-07
相关资源
相似解决方案