- 建立本地仓库
git init
- 添加要管理的文件
git add --all
- 将文件提交到本地仓库
git commit -m "frist commit"
- 在GitHub上创建远程仓库,并保存该仓库地址。
- 将本地仓库于远程仓库关联
git remote add origin https://github.com/用户名/远程仓库名称.git
- 将本地仓库的已提交的文件更新到远程仓库
git push -u origin master
git init
git add --all
git commit -m "frist commit"
git remote add origin https://github.com/用户名/远程仓库名称.git
git push -u origin master