github 上传步骤

1.在命令行中,输入“git init”,使Test文件夹加入git管理;
2.输入“git add .”(不要漏了“.”),将Test文件夹全部内容添加到git。
3.输入“git commit -m "first commit"”(“git commit -m "提交信息"”)
4.输入“git remote add origin https://github.com/userName/File.git”(git remote add origin 你自己的https地址),连接你的guthub仓库。
5.输入“git push -u origin master”,上传项目到Github。这里会要求输入Github的账号密码,按要求输入就可以。

在第4步  连接GitHub时遇到 HttpRequestException encountered问题

解决:Github 禁用了TLS v1.0 and v1.1,必须更新Windows的git凭证管理器 
通过此网址https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases/

下载之后安装重启git窗口 
$ git remote add origin https://github.com/userName/File.git 
userName是你的用户名File是你自己建的 repository名称 
$ git remote rm origin 

就可以了!!

 

posted @ 2018-05-23 13:44  jiangkunkun  阅读(89)  评论(0)    收藏  举报