Reference: http://myswirl.blog.163.com/blog/static/51318642201191395357296/
1. First, let's talk about git and GitHub.
GitIs a distributed version control system.Was originally written by Linus Torvalds and used as the management of Linux kernel code. After its launch, git has also achieved great success in other projects, especially in the Ruby community. Currently, many well-known projects, including rubinius and MerB, use git.
Rails-based git repository hosting
As mentioned above, as a distributed version control system, git does not have the concept of a master database. Each copied database can be used independently, any inconsistency between the two databases can be merged.
GitHub can host a variety of git libraries and provide a web interface, but unlike other services such as SourceForge or Google Code, GitHub's unique selling point is the simplicity of branch from another project. It is very easy to contribute code to a project: First click the "fork" button of the project site, and then check out the code and add the modifications to the code library just separated, finally, we apply for code merging from the project owner through the built-in "pull request" mechanism.
2. register the GitHub account and log on
GitHub Official Website:
Logon interface:
3. Download and install git
Download: Git-1.7.7-preview20111012.exe
Http://code.google.com/p/msysgit/downloads/list
Use the default options for each step.
Next, select "context menu entries"
Do not use putty if you are given the option. GitHub only provides support for OpenSSH.
4. Install SSH keys
4.1 start git Bash:
4.2 generate a new SSH key
Email: the email you registered earlier.
$ Ssh-keygen-t rsa-c "yourname@163.com"
Generate two new files: id_rsa and id_rsa.pub in "C: \ Documents and Settings \ Administrator \. Ssh ".
NOTE: If "id_rsa" and "id_rsa.pub" are generated and successfully added to GitHub, you can copy these two files from another computer, which is equally available,
You no longer need to regenerate and add "SSH key.
5. Add the SSH key to GitHub
5.1 On the GitHub site click "account settings"> click "ssh public keys"> click "add another public key"
5.2 open id_rsa.pub in notepad and copy the content to "key". The title can be blank.
Note: Do not add any spaces or press Enter;
Note: it cannot be opened with editplus. (It can be opened with editplus, which leads to changes in the copied content, so it will continue to fail)
6. Check whether the settings are correct.
Enter passphrase. The password used to generate the SSH key.
If the following page appears, it indicates that the installation is successful: (install the above steps strictly. It will certainly be successful)
7. You can download the code.
How to Use git to obtain the latest source code of maobao