创建仓库
先在github上创建一个仓库
![img_c2c5672178e725ee964f81f22b86250f.png](https://yqfile.alicdn.com/img_c2c5672178e725ee964f81f22b86250f.png?x-oss-process=image/resize,w_1400/format,webp)
创建仓库
点击之后看下图:
![img_f355a284ea4a838dea0278c1253aff40.png](https://yqfile.alicdn.com/img_f355a284ea4a838dea0278c1253aff40.png?x-oss-process=image/resize,w_1400/format,webp)
详情
先点第一个箭头所指的,再点第二个箭头所指的。
跳转的网页
![img_8c5ad38039286c60fcbf86299e09490b.png](https://yqfile.alicdn.com/img_8c5ad38039286c60fcbf86299e09490b.png?x-oss-process=image/resize,w_1400/format,webp)
详情
输入上传项目的名称,点击创建。
![img_d308daa9bce91dde91dc2307b7fe6631.png](https://yqfile.alicdn.com/img_d308daa9bce91dde91dc2307b7fe6631.png?x-oss-process=image/resize,w_1400/format,webp)
记下网址
这里记下网址,后面要用到。
到这里仓库就创建完成了
上传项目
在你本地的文件夹下,使用 git 上传,至于怎样配置 git 自行百度吧
在本地项目文件夹内右击,选择
「Git Bash Here」,进入到Git命令行中执行如下命令:
git init #将项目中的文件加入到git管理
git add . #将项目中的全部内容添加到git
这里注意 add 后的「.」
git commit -m "这里填项目的名称
"
git remote add origin http://github.com/xxxxx/xxxxx #连接到前面在GitHub中新建的仓库,上文记住的网站
git push -u origin master #上传项目