利用git上传本地文件、文件夹到Github

安装好GIT完成后,找到Git bash,双击打开。

第一步:从git获取项目到本地

git clone https://github.com/zhangwei900808/awbeci-ssb.git

第二步:在自己的GIT仓库远程创建项目:awbeci-ssb

  

第三步:进入刚才clone的文件目录下,然后增加源分支地址到你项目远程分支列表中,命令

cd awbeci-ssb
git remote add awbeci-ssb https://github.com/cwn132/awbeci-ssb.git
 

第四步:关联github仓库

//新建一个repository时会出现下面的代码,直接复制即可
git remote add awbeci-ssb https://github.com/cwn132/awbeci-ssb.git

注意:

如果出现错误:fatal: remote origin already exists,则执行以下语句:

git remote rm awbeci-ssb

  

第五步:放到自己的GIT仓库

git push awbeci-ssb master  

  

原文地址:https://www.cnblogs.com/ningshare/p/11041424.html