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

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

     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上创建工程将本地代码上传到github,代理和设置和取消_第1张图片

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

	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,代理和设置和取消_第2张图片

第四步:取消代理:

   git config --global  --unset  http.proxy

  git  config --global  --unset  https.proxy

你可能感兴趣的:(将本地代码上传到github,代理和设置和取消)