您的位置:首页 > 移动开发 > IOS开发

教你使用mac上传本地iOS代码到github

2016-10-31 11:19 211 查看
1.顾名思义,首先你得注册一个github账户 这个我就不细说了。

2.然后你得创建一个 repository 步骤见下图





3.相当于创建成功 会跳到下图界面



4.一看就很清楚了

create a new repository on the command line 意思就是让你把下面的命令行在终端安装顺序执行就可以了,最后你刷新就会看到已经上传好的项目文件了。

以下是网上搜罗的git 常用命令

更新代码

cd /d/TVCloud
git add .
git commit -m "update test" //检测文件改动并附加提交注释
git push -u origin master //提交修改到项目主线

github常用命令

git push origin master //把本地源码库push到Github上
git pull origin master //从Github上pull到本地源码库
git config --list //查看配置信息
git status //查看项目状态信息
git branch //查看项目分支
git checkout -b host//添加一个名为host的分支
git checkout master //切换到主干
git merge host //合并分支host到主干
git branch -d host //删除分支host
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: