往github上传demo

一直在github上寻找demo,但怎么传demo上githun呢?

http://www.2cto.com/kf/201504/390397.html

首先在github上 new一个repository工程;

两种方法,一种是在xcode里面选择git,填上git地址,进行commit & push

还有一种是通过命令行进入你的ios项目文件夹,然后执行

git init

git remote add origin you_project_url_on_git

git add .

git commit -m "first commit"

git push origin master

 注:如果在git init的时候 出现Reinitialized existing Git repository in 。。。

说明你的工程里已经含有.git的文件了,可以 用命令行显示隐藏文件,然后删除它;

然后继续执行上面的步骤

原文地址:https://www.cnblogs.com/neworiginou/p/5152211.html