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

本文介绍了如何将本地代码上传到GitHub,包括设置和取消HTTP/HTTPS代理的步骤。首先,通过git config命令设置全局代理,然后在GitHub上创建新项目,接着按照提示操作,最后通过相同命令取消代理设置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

     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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值