GitHub上传

1创建新的仓库(Repsitory)并提交代码

    1>登陆GitHub后创建新仓库(不要勾选Initialize this repository with a README,可以后期手动在本地库添加并提交),copy好库的地址,像:https://github.com/CaptainNYS/LT-Linear-Threshold-Model-.git

     2>在本地库(你想要上传的文件夹)下右击选择 git bash here,出现弹框

    3>依次输入(括号内为注释)

       git init 

       git add .

       git commit -m "first commit"(引号内为自己添加的提交注释)

       git remote add origin https://github.com/CaptainNYS/LT-Linear-Threshold-Model-.git (自己库的https链接)

       git push -u origin master

  

 2向创建好的库提交代码

        不再需要git init,其余步骤同上。

        注意:之后提交时,输入git remote add origin https://github.com/CaptainNYS/LT-Linear-Threshold-Model-.git ,回车后会出现报错:fatal: remote origin already exists.

        此时输入 git remote rm origin 回车后继续输入 上一条命令即可。

猜你喜欢

转载自blog.csdn.net/captainNYS/article/details/80192482
今日推荐