如何mac客户端上传github
1、下载github客户端
2、登录github客户端并设置邮箱地址


3、创建一个资源库->Create Repository
取消以下方式上传

注:本地项目选择时一定要选择文件根目录
经测试不知为什么实用create方式创建上传成功后,下载下来没有.xcodeproj文件,导致不能运行(若有知道的同学,还请告知原因),若本地已创建完好的工程建议直接实用add方式添加。

若如上图所示,提示A repository already exists here则可能是你重复上传github,则会在本地产生相应的.git文件,该文件为隐藏文件,需要删除所有.git目录,可在终端执行以下命令:
显示Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles YES;
隐藏Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles NO;
使用命令删除该文件下所以.git文件: sudo find /Users/**/Documents/workspace/ -name ".git" -exec rm -r {} \;
重启finder(command+option+esc,选中finder重启),找到相应工程删除所有文件夹下的.git文件,重新Create Repository即可。
4、提交github


5、到此为止上传github完毕,登录githu即可看到刚才上传的工程

5、添加gif或图片展示图,在其他用户查看demo时,可以先看下效果图在决定是否需要下载
① 在本地工程共,添加展示图片截图或只做gif图片(mac gif只做可使用licecap软件制作)
② 将图片或gif添加到刚才的本地工程中
③ 将重复地4步,重新提交github
④ github图片链接格式:
github-account:gihub账号名称 your-repository:工程名称
images-folder:图片资源在工程中存放的文件夹路径
xxx.png:资源图片或gif文件
为省事可直接在github上查看刚发布的工程,确定github-account/your-repository:

images-folder/xxx.png也可根据在客户端提交时存在的路径:

6、将效果图链接添加github readme.md文件中:



效果图链接:
注意:请使用https请求.
至此添加完成,OK了。
7、删除github上相应工程文件
找到工程中settings-底部删除选项-输入将要删除的工程名称即可完成删除功能。


