怎么把本地项目上传到github

368 阅读1分钟

把已存在的项目文件夹整个上传到github,使用git命令的方式【记录一下】

安装Git

  1. 官方版本可以在 Git 官方网站下载【 git-scm.com/download/wi…
  2. 安装完毕后进入一个文件夹,右键出现Git GUI Here Git Bash Here

创建GitHub项目

  1. 登录自己github>右侧头像>下三角>Your repositories
  2. New >> 填写Repository name >> 页面下方点击Create repository
  3. 空项目建好,复制地址 https://github.com/xxx/yyy.git

上传文件

  1. 进入自己的项目源码根目录,或其他待上传文件夹目录下
  2. 右键>Git Bash Here
  3. git init
  4. git add . #不要漏写“.”。
  5. git commit -m "init commit"
  6. git remote add origin https://github.com/xxx/yyy.git
  7. git push -u origin master

刷新github页面查看