Mac之Git/GitHub使用(2)——Create A Repo
2014-04-07 00:51
375 查看
2014-04-06 wcdj
摘要:前文《Mac之Git/GitHub使用(1)——Set
up Git 》介绍了如何在Mac上通过git关联和使用GitHub的方法。本文继续介绍下Create A Repo的方法。
如何把本地的git repo和GitHub repo联系起来呢?
(1) 在GitHub的个人账户上可以创建一个repo。
例如,创建一个nodejs-code的repo,注意我们没有选择创建默认的README。
Congratulations! You have successfully created your first repository!
- if your project becomes popular people will want to help you out.
README用于介绍创建的repo的相关信息,更多关于README的高级用法,可以参考:https://github.com/github/markup。点击Create repository按钮后,可以看到如下的操作提示,主要有以下几个步骤:
Step 1: Create the README file
Step 2: Commit your README
Step 3: Push your commit
Now that you have your README set up, it's time to commit it. A commit is essentially a snapshot of all the files in your project at a particular point in time.
注意:在GitHub上不要上传过大的文件,包括一些库、二进制文件、压缩包等。
So far, everything you've done has been in your local repository, meaning you still haven't done anything on GitHub yet. To connect your local repository to your GitHub account, you will need to set a remote for your repository and push your commits to it.
到目前为止,我们所有的改动都是发生在本地的,所以需要将本地的改动commit到远程的GitHub上。
回到我们刚创建好的repo中,我们根据提示执行命令:
修改成下面的方法就可以向远程的GitHub commit文件(README.md)了。其中,使用https://github.com/gerryyang/nodejs-code的访问方式只能在浏览器里操作,所以改成ssh的后台登陆方式来与远程的GitHub进行交互了,关于如何Add SSH Key,第一篇文章里有介绍。
Now if you look at your repository on GitHub, you will see your README has been added to it.
提交成功后,现在就可以在GitHub上看到我们刚提交的README.md文件了。
Set Up Git
Create A Repository
Fork A Repository
Be Social
参考
[1] https://help.github.com/articles/create-a-repo
摘要:前文《Mac之Git/GitHub使用(1)——Set
up Git 》介绍了如何在Mac上通过git关联和使用GitHub的方法。本文继续介绍下Create A Repo的方法。
Make a new repository on GitHub
Every time you make a commit with Git, it is stored in a repository (a.k.a. "repo"). To put your project up on GitHub, you'll need to have a GitHub repository for it to live in.如何把本地的git repo和GitHub repo联系起来呢?
(1) 在GitHub的个人账户上可以创建一个repo。
例如,创建一个nodejs-code的repo,注意我们没有选择创建默认的README。
Congratulations! You have successfully created your first repository!
Create a README for your repository
While a README isn't a required part of a GitHub repository, it is a very good idea to have one. READMEs are a great place to describe your project or add some documentation such as how to install or use your project. You might want to include contact information- if your project becomes popular people will want to help you out.
README用于介绍创建的repo的相关信息,更多关于README的高级用法,可以参考:https://github.com/github/markup。点击Create repository按钮后,可以看到如下的操作提示,主要有以下几个步骤:
Step 1: Create the README file
Step 2: Commit your README
Step 3: Push your commit
Now that you have your README set up, it's time to commit it. A commit is essentially a snapshot of all the files in your project at a particular point in time.
注意:在GitHub上不要上传过大的文件,包括一些库、二进制文件、压缩包等。
So far, everything you've done has been in your local repository, meaning you still haven't done anything on GitHub yet. To connect your local repository to your GitHub account, you will need to set a remote for your repository and push your commits to it.
到目前为止,我们所有的改动都是发生在本地的,所以需要将本地的改动commit到远程的GitHub上。
回到我们刚创建好的repo中,我们根据提示执行命令:
修改成下面的方法就可以向远程的GitHub commit文件(README.md)了。其中,使用https://github.com/gerryyang/nodejs-code的访问方式只能在浏览器里操作,所以改成ssh的后台登陆方式来与远程的GitHub进行交互了,关于如何Add SSH Key,第一篇文章里有介绍。
Now if you look at your repository on GitHub, you will see your README has been added to it.
提交成功后,现在就可以在GitHub上看到我们刚提交的README.md文件了。
Celebrate
Congratulations! You have now created a repository on GitHub, created a README, committed it, and pushed it to GitHub. What do you want to do next?Set Up Git
Create A Repository
Fork A Repository
Be Social
参考
[1] https://help.github.com/articles/create-a-repo
相关文章推荐
- <Lua程序设计(第二版)>书摘-3
- 用Google Authenticator加强SSH登录安全性
- YII 小部件 yii小部件查看方法 小物件做的表单
- 在Eclipse中配置Weblogic12c
- 在MyEclipse中配置Weblogic12c
- [贰]Pomelo游戏服务器编程分享 之 环境搭建
- 使用Hibernate上下文会话持久化对象
- Python学习笔记之20140406
- Java对象的序列化和反序列化
- C语言作业
- Windows编程之提权
- Java字符编码转换与文件加锁
- Java 新I/O类库
- Java标准I/O的概念
- 4.3 spring-嵌入式beans标签的解析
- Java I/O流的认识
- Java设计模式之从[鼠标接口][星际争霸中的兵种行为]分析适配器(Adapter)模式
- 微软编程之美传话游戏、长方形 Java实现
- Java线程ThreadLocal
- effective c++ 11: Handle assignment to self in operator =