1.在GitHub上创建新的项目文件

2.创建之后会进入新的页面,看到如下图的内容,将地址记下来

3.打开Git
4.进入项目本地所在目录

5.输入:git init 这个意思是在当前项目的目录中生成本地的git管理。
6.输入git add . //这个是将项目上所有的文件添加到仓库中的意思,如果想添加某个特定的文件,只需把.换成这个特定的文件名即可。

7.输入git commit -m "first commit" //表示你对这次提交的注释,双引号里面的内容可以根据个人的需要改。

8.输入git remote add origin https://自己的仓库url地址(上面有说到) 将本地的仓库关联到github上
9.输入git push -u origin master,这是把代码上传到github仓库的意思
10.执行完后,如果没有异常,会等待几秒,然后跳出一个让你输入Username和Password 的窗口,你只要输入github的登录账号和密码就行了
