Xcode和github入门详细教程

Xcode和github详细教程!

主要是参考了现在网上的一些资料给没整过的人一个详细的指南。

(1)先在github上注册账号,自行解决!

(2)在导航栏右上角new一个repository(仓库)。

(3)填写仓库的名称、描述等信息。第二部是设置公开或者私人项目,隐私项目适合于公司的代码托管但是是收费的。

(4)下面就不用管了,在MAC电脑上生成你的ssh秘钥,此处转载http://www.cnblogs.com/sorex/archive/2012/05/25/2517763.html。

jomatoMac-mini:~ sorex1984$ ssh-keygen -t rsa -C "your_email@youremail.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/sorex1984/.ssh/id_rsa): abcde[文件名,此处如果不填写abcde文件,则会在默认生成id_rsa文件]
Enter passphrase (empty for no passphrase): [密码必须大于4位]
Enter same passphrase again: [再次输入密码]
Your identification has been saved in abcde.
Your public key has been saved in abcde.pub.
The key fingerprint is:
ea:74:df:7d:29:de:c9:37:80:49:be:d9:5c:9e:03:94 your_email@youremail.com
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|                 |
|              .  |
|           . E   |
|        S o +    |
|       .   + o . |
|      o .   = = o|
|     o . . + =o*+|
|      .   . o.o=+|
+-----------------+

然后在电脑上command+shift+g前往“/Users/sorex1984/.ssh/”这个文件夹下:

(5)打开id_rsa.pub这个文件,将文件中的内容复制到github  》account setting 》SSH Keys 》Add SSH Key中:

(6)点开项目将ssh的URL地址复制出来在客户端中就可以用了。

(7)新建项目,选择第二个。git@github.com:daleiwang/HelloProject.git

(8)将地址填入,然后将github上的这个项目的文件夹映射到本地的一个文件夹下。

(9)新建一个项目保存到本地的这个HelloProject下面。点击Source Controller 》 Commit。提交项目。

(10)点击Source Controller 》 Push 

(11)最终项目已经提交到github上了。

第一次用git,以前都是用的SVN,git用的不熟悉,这篇博客主要是参考了别人的博客加上自己的一点摸索。如果有问题希望指教!

原文地址:https://www.cnblogs.com/isItOk/p/4872979.html