将本地项目上传到github

 

  1. 在github创建一个新的仓库
  2. 克隆github上远程仓库的地址
  3. 在本地的项目根目录下打开提前安装好的Git Bash
//初始化git
git init
//添加远程仓库到本地
git remote add origin https://github.com/xxx/xxx.git
//先从远程库下拉更新保持同步
git pull origin 分支名称
//上传本地项目到github远端仓库
git add .
git status
git commit -am "备注文本"
git push origin 分支名称
原文地址:https://www.cnblogs.com/baixinL/p/14120541.html