本地项目上传远程github

第一步:创建项目文件夹
第二步:在创建的文件夹中 通过命令 git init 将这个文件夹变成git 管理仓库
第三步: git bash 中 输入 git add . 将该目录下的所有文件谈价到远程仓库 (注意 命令 git add . 其中的 . 和add中间是隔开的 ) 执行完毕可使用 git status 查看添加git 的文件状态
第四步: 用 git commit -m “注释” 使用git commit -m 将项目提交到仓库 (本地仓库 未同步到远程 )
第五步: 在github 上创建项目仓库 得到 仓库地址
第六步:关联 本地仓库和github上的仓库地址 命令为 git remote add origin https://github.com/xxx/xxxi.git ( 注意 origin 后面为远程仓库地址)
第七步:git pull --rebase origin master 将本地文件夹和远程进行合并
第八步:git push -u origin master 将关联好的本地仓库的所有内容推送至远程仓库

git init

 git add .

git commit -m "注释"

git remote add origin https://github.com/xxxxx/xxx.git 

git pull --rebase origin master

git push -u origin master

猜你喜欢

转载自blog.csdn.net/weixin_37178320/article/details/105507877