注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

伯纳乌の夢

可以挽回么?我们按“ Ctrl+Z”撤销掉吧。对不起啦~~

 
 
 

日志

 
 
 
 

[Fw]Create A Repo  

2011-05-06 22:52:55|  分类: 默认分类 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
[Trackback]http://help.github.com/create-a-repo/

Create A Repo

If you’ve found yourself on this page, we’re assuming you’re brand new to Git and GitHub. This guide will walk you through the basics and explain a little bit about how everything works along the way.

First: Create A Repo

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.

More about repositories

  1. Create a new repo

    Click “New Repository.

    Click “New Repository

    Fill out the information on this page. When you’re done, click “Create Repository.”

    Fill in the info

    Congratulations! You have successfully created your first repo!

Next: Create a README for your repo.

While a README isn’t a required part of a GitHub repo, it is a 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.

More about READMEs

  1. Create the README file

    In the prompt, type the following code:

    $ mkdir ~/Hello-World $ cd ~/Hello-World $ git init Initialized empty Git repository in /Users/your_user_directory/Hello-World/.git/ $ touch README 

    Open the new README file found in your Hello-World directory in a text editor and add the text “Hello World!” When you are finished, save and close the file.

  2. Commit your README

    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. In the prompt, type the following code:

    More about commits

    $ git add README $ git commit -m 'first commit' 

    The code above executes actions locally, 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 repo and push your commits to it:

    More about remotes

    $ git remote add origin git@github.com:username/Hello-World.git $ git push origin master 

    Now if you look at your repository on GitHub, you will see your README has been added to it.

    Your README has been created

Lastly: 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?

  1. Set Up Git
  2. Create A Repository
  3. Fork A Repository
  4. Be Social
  评论这张
 
阅读(371)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017