第一步:下载git
官网:https://git-scm.com/
下载完成之后右键会有一个 Git Bush Here
在github新建仓库
第一次推送
- 打开项目的根目录,右键选择Git Bush Here
- 依次输入如下命令
git init
git add -A
git commit -m "first commit"
git remote add origin https://github.com/用户名/GitHub上的仓库名.git
git push --set-upstream origin master
第二次推送
- 打开项目的根目录,右键选择Git Bush Here
- 依次输入如下命令
git add -更新的文件夹名字
git commit -m "first commit"
git push --set-upstream origin master
推送成功截图:
推送成功后查看仓库就会有相应的代码。