git 将本地代码push到github

以cnblogs-scrapy.git为例介绍如何将本地代码push到github

  1. 在github上创建对应的仓库:https://github.com/hotbaby/cnblogs-scrapy.git
  2. 初始化本地仓库: $ git init
  3. 将代码添加本地仓库中: $ git add .
  4. 添加Log:$ git commit –m “Initialize commit.”
  5. 添加远程仓库:$ git remote add origin https://github.com/hotbaby/cnblogs-scrapy.git
  6. 将本地仓库push到远程仓库: $ git push origin master
posted @ 2015-10-16 09:54  hotbaby  阅读(674)  评论(0编辑  收藏  举报