[从零开始系列]windows下怎么github使用(参考 github help)

[从零开始系列]windows上如何github使用(参考 github help)

[从零开始系列]windows下怎么github使用(参考 github help)

[从零开始系列]windows下怎么github使用(参考 github help)

Build software better, together.

Powerful collaboration, review, and code management for open source and private development projects.

基于Rails的Git库托管

GitHub可以托管各种git库,并提供一个web界面,但与其它像 SourceForgeGoogle Code这样的服务不同,GitHub的独特卖点在于从另外一个项目进行分支的简易性。为一个项目贡献代码非常简单:首先点击项目站点的“fork”的按 钮,然后将代码检出并将修改加入到刚才分出的代码库中,最后通过内建的“pull request”机制向项目负责人申请代码合并。

https://github.com/

1.注册

这里就不废话了

2.Set Up Git,设置Git

下载最新版本的Git,GitHub上提供了一个地址:http://github-windows.s3.amazonaws.com/GitHubSetup.exe

Windows版本的可以去这里下载:http://code.google.com/p/msysgit/

[从零开始系列]windows下怎么github使用(参考 github help)

安装好之后,打开Git Bash

Now that you have Git installed, it's time to configure your settings. To do this you need to open Git Bash (not the Windows command line).

开始做一些简单的配置。配置user.name和user.email

[从零开始系列]windows下怎么github使用(参考 github help)

(1)First you need to tell git your name, so that it can properly label the commits you make.

设置Git的user.name,方便标定你每次的Commit

git config --global user.name "Your Name Here"

(2)Git saves your email address into the commits you make. We use the email address to associate your commits with your GitHub account.

设置Git的user.email,每一次的Commit,Git都会保存你的Email。Github会根据这个email,将你的commits和github账号关联起来。

git config --global user.email "your_email@youremail.com"

Your email address for Git should be the same one associated with your GitHub account. If it is not, see this guide for help adding additional emails to your GitHub account. If you want to keep your email address hidden, this guide may be useful to you.

一般情况下,你git的email应该和你的github账号的email相同。

3.Create A Repo 创建仓库

登录Github,点击New Repository

[从零开始系列]windows下怎么github使用(参考 github help)

然后看着填吧

[从零开始系列]windows下怎么github使用(参考 github help)


填一个Repository Name就可以了,其他的,README可以初始化,也可以不初始化,下一步就是直接在GitHash里面创建一个README。

打开你的githash

(1)创建一个README

[从零开始系列]windows下怎么github使用(参考 github help)

(2)Commit你的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:

README建立好,之后,可以进行commit。一次commit是在特定时间点上你工程下所有文件的快照。

[从零开始系列]windows下怎么github使用(参考 github help)

(3)Push你的Commit

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 repo and push your commits to it:

到目前为止,你在本地的仓库进行了操作,但是你还没有push到Github远程服务器的仓库。

[从零开始系列]windows下怎么github使用(参考 github help)

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

可以到你的Github上去看,是否有更新。