1,注册GitHub账号 https://github.com/
2,登录,首次要先创建一个仓库,用来存储项目。
步骤:先用鼠标点右上角的 “ + ”,然后再点 “New repository” ,记住SSH后面的地址,比如“SSH”后面的内容是:https://github.com/xxxx/-.git
3,仓库新建完后,然后就去下载一个git,可以网上搜索git下载,官网地址:https://git-scm.com/downloads/
4,安装完毕后,就打开Git Bash。
5,输入cd 你的地址,比如cd d:,git init,再输入 " git add . ", 这个是将项目上所有的文件添加到仓库中的意思,如果想添加某个特定的文件,只需把’ . '换成这个特定的文件名即可。git commit -m "first commit ",表示对提交的注释,输入 “git remote add origin https://github.com/xxxx/-.git(换成自己的)” 将本地的仓库关联到github上,最后一步,输入 "git push -u origin master ",正式的把代码上传到github仓库,需要登录自己的Github账户与密码。