上传项目到github

1、在.ssh文件下生成ssh钥匙对:   ssh-keygen -t rsa -C "[email protected]"  

2、讲公钥 id_ras.pub复制到GitHub中

3、将本地的仓库关联到github上     git remote add origin https://github.com/hanhailong/CustomRatingBar

     后面的https链接地址换成你自己的仓库url地址

4、上传github之前,要先pull一下,执行如下命令:

  git pull origin master

5、最后一步,上传代码到github远程仓库

  git push -u origin master

执行完后,如果没有异常,等待执行完就上传成功了,中间可能会让你输入Username和Password,你只要输入github的账号和密码就行了

6、下载项目到本地Git仓库用git clone指令:

    git clone https://github.com/fei2232/Project_Git.git

扫描二维码关注公众号,回复: 893705 查看本文章

猜你喜欢

转载自www.cnblogs.com/fei2232/p/9051210.html