一、Github创建一个新的代码仓库
1、新建一个仓库

2、输入相关信息

3、新建完成 获得仓库地址
https://github.com/FDoubleman/test.git

二、初始化本地仓库
git init
三、本地提交代码
1、添加仓库 git add *

2、提交到仓库 git commit -m"xxxx"

四、Push代码至Github上
1、$ git remote add origin https://github.com/FDoubleman/GWeather.git(换成自己的仓库地址)

2、注意现在还不能直接push ,因为githu的仓库已经被提交过一次了。
如果 直接push 会报下面的错误

3、$ git pull --rebase origin master

4、$ git push origin master

提交完成就提交完成了。
本文详细介绍如何在GitHub上创建新的代码仓库,并将本地代码提交至该仓库。包括仓库创建、本地初始化、代码提交及推送等步骤。
1312

被折叠的 条评论
为什么被折叠?



