将本地代码添加到github

首先在github上创建一个仓库。

第一步:建立本地仓库

  git init

关联远程仓库

git remote add origin https://github.com/tshua/***.git

pull一下

  git pull (git pull origin master)

第二步:添加项目文件

  git add 文件、目录

第三步:commit

  git commit -m "注释"

第四步:

  git push -u origin master

原文地址:https://www.cnblogs.com/tshua/p/5589002.html