github desktop for mac 上传项目步骤以及注意事项
2016-04-07 09:55
369 查看
1.注册一个github账号在官网。https://github.com/github
2.下载mac版的github客户端。网址:https://desktop.github.com
3.之后会在出现安装。安装成功之后,会出现这个
![](http://upload-images.jianshu.io/upload_images/1025776-a9a711f0dcdee2d2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
图标
4.打开github的客户端并且登陆客户端。
5.注意:
a.在创建工程过程中,工程的名字一定不要有" "空格出现,不然就添加不进去了。因为文件的名字在创建过程中,自动改变了,我就是吃了这个亏了。
b.包含工程最外层的文件名字可以自己更改(也就是文件路径),但是内部的工程的名字不要随意更改,并且保持Name的名字与工程名字一致。否则添加代码也会失败。
![](http://upload-images.jianshu.io/upload_images/1025776-81bb03a8a6fb4194.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
注意事项
6.
![](http://upload-images.jianshu.io/upload_images/1025776-24d63ba4c51f9502.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
正常情况下的示例
7.
![](http://upload-images.jianshu.io/upload_images/1025776-9316c721a93464c4.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
成功上传代码之后的样式
8.
![](http://upload-images.jianshu.io/upload_images/1025776-9da0d085d9cb4272.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
重复上传的示例(已经创建过一次)
9.若如上图所示,提示A repository already exists here则可能是你重复上传github,则会在本地产生相应的.git文件,该文件为隐藏文件,需要删除所有.git目录,可在终端执行以下命令:
显示Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles YES
隐藏Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles NO
重启finder(command+option+esc,选中finder重启),找到相应工程删除所有文件夹下的.git文件,重新Create Repository(创建工程)即可。
10.先添加Changes到master分支,编辑好描述后点击Commit to master:
注意:"Commit to master"意为提交到master分支,它是将代码存到本地仓库,然后通过push的方式将本地仓库同步到Github服务器所管理的仓库。
![](http://upload-images.jianshu.io/upload_images/1025776-36e3515b1270b4b5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
先添加本地分之master,再实现上传
11.添加一个本地分之后,点击Commit to master,会出现下面的 画面,并且每次添加一个分之都会成为一个历史。
![](http://upload-images.jianshu.io/upload_images/1025776-e19dedb279ceeb08.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
每次更改的内容
12.
![](http://upload-images.jianshu.io/upload_images/1025776-914009c1208d9b24.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
上传代码
12.上传过程中:
![](http://upload-images.jianshu.io/upload_images/1025776-4d1d519c58f048de.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
上传过程中
13.上传成功之后:
![](http://upload-images.jianshu.io/upload_images/1025776-8fe02ad1fe5f54d4.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
上传成功之后
14.
![](http://upload-images.jianshu.io/upload_images/1025776-a318f1d5ca56b8d8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
15.
![](http://upload-images.jianshu.io/upload_images/1025776-627f69926af75eb0.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
在github上展示
*****Revert this commit:撤销更改内容
![](http://upload-images.jianshu.io/upload_images/1025776-f4685e879b2c1acc.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
实现撤销更改内容
实现撤销内容的展示:
![](http://upload-images.jianshu.io/upload_images/1025776-888a1a6d7d93a005.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
实现撤销
好了下面再添加两个参考网址:
1.iOS 使用GitHub托管代码:http://www.jianshu.com/p/3a553eab8bfc
2.如何mac客户端上传github:http://www.jianshu.com/p/0529d66bae10
2.下载mac版的github客户端。网址:https://desktop.github.com
3.之后会在出现安装。安装成功之后,会出现这个
![](http://upload-images.jianshu.io/upload_images/1025776-a9a711f0dcdee2d2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
图标
4.打开github的客户端并且登陆客户端。
5.注意:
a.在创建工程过程中,工程的名字一定不要有" "空格出现,不然就添加不进去了。因为文件的名字在创建过程中,自动改变了,我就是吃了这个亏了。
b.包含工程最外层的文件名字可以自己更改(也就是文件路径),但是内部的工程的名字不要随意更改,并且保持Name的名字与工程名字一致。否则添加代码也会失败。
![](http://upload-images.jianshu.io/upload_images/1025776-81bb03a8a6fb4194.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
注意事项
6.
![](http://upload-images.jianshu.io/upload_images/1025776-24d63ba4c51f9502.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
正常情况下的示例
7.
![](http://upload-images.jianshu.io/upload_images/1025776-9316c721a93464c4.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
成功上传代码之后的样式
8.
![](http://upload-images.jianshu.io/upload_images/1025776-9da0d085d9cb4272.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
重复上传的示例(已经创建过一次)
9.若如上图所示,提示A repository already exists here则可能是你重复上传github,则会在本地产生相应的.git文件,该文件为隐藏文件,需要删除所有.git目录,可在终端执行以下命令:
显示Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles YES
隐藏Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles NO
重启finder(command+option+esc,选中finder重启),找到相应工程删除所有文件夹下的.git文件,重新Create Repository(创建工程)即可。
10.先添加Changes到master分支,编辑好描述后点击Commit to master:
注意:"Commit to master"意为提交到master分支,它是将代码存到本地仓库,然后通过push的方式将本地仓库同步到Github服务器所管理的仓库。
![](http://upload-images.jianshu.io/upload_images/1025776-36e3515b1270b4b5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
先添加本地分之master,再实现上传
11.添加一个本地分之后,点击Commit to master,会出现下面的 画面,并且每次添加一个分之都会成为一个历史。
![](http://upload-images.jianshu.io/upload_images/1025776-e19dedb279ceeb08.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
每次更改的内容
12.
![](http://upload-images.jianshu.io/upload_images/1025776-914009c1208d9b24.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
上传代码
12.上传过程中:
![](http://upload-images.jianshu.io/upload_images/1025776-4d1d519c58f048de.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
上传过程中
13.上传成功之后:
![](http://upload-images.jianshu.io/upload_images/1025776-8fe02ad1fe5f54d4.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
上传成功之后
14.
![](http://upload-images.jianshu.io/upload_images/1025776-a318f1d5ca56b8d8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
15.
![](http://upload-images.jianshu.io/upload_images/1025776-627f69926af75eb0.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
在github上展示
*****Revert this commit:撤销更改内容
![](http://upload-images.jianshu.io/upload_images/1025776-f4685e879b2c1acc.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
实现撤销更改内容
实现撤销内容的展示:
![](http://upload-images.jianshu.io/upload_images/1025776-888a1a6d7d93a005.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
实现撤销
好了下面再添加两个参考网址:
1.iOS 使用GitHub托管代码:http://www.jianshu.com/p/3a553eab8bfc
2.如何mac客户端上传github:http://www.jianshu.com/p/0529d66bae10
相关文章推荐
- Spring源代码解析(一):IOC容器
- 每天laravel-20160703|ClearCommand
- scrapyd的安装
- JAVA的环境的手动安装配置
- Python Requests 基础入门
- Python函数参数默认值的陷阱和原理深究
- 每天laravel-20160702|CacheTableCommand
- php中高级基础知识点
- 每天laravel-20160702|CacheTableCommand
- C# 对象序列化和反序列化
- 蓝桥杯b组c++.8 四平方定理
- C++作业3
- java.lang.OutOfMemoryError: PermGen space及其解决方法
- c++作业3
- PHP调用java的class
- Python文本去重
- C++上机实验3-个人所得税计算器
- jdk下载安装配置
- C语言中Static和Const关键字
- 二进制中1的个数 & 打印1到最大的n位数 Java实现