上传本地文件到github
- 在github官网注册账户
-
点击New repository (新建仓库)
3.记得勾选Initialize this repository with a README,这样就不用自己再配置README文件了

4.github已经帮我们生成了README文件

5.打开git bash,进入到git文件夹下,使用git clone "项目的地址"将github中的项目克隆到本地

6.将要上传的文件复制到刚刚克隆到本地的文件夹下

7.git bash进入到该文件夹下,首先git pull origin master(将本地的master分支推送到origin主机的master分支。如果后者不存在,则会被新建。),其次git add .将该文件夹下所有文件选中

8.执行git commit -m "本次更新的信息"
9.git push origin master(将选中的文件上传至github中)
10.文件已经成功上传

网友评论