This article source: http://www.eoeandroid.com/thread-274556-1-1.html
Another classic tutorial URL: http://wuyuans.com/2012/05/github-simple-tutorial/
Git is a distributed version control system that was originally written by Linus Torvalds and used as the management of Linux kernel code. Since its launch, Git has also been a big success in other projects, especially in the Ruby community. Currently, many well-known projects, including Rubinius and Merb, use Git. Git can also be used by deployment tools such as Capistrano and Vlad the Deployer. Similarly, the source code for the eoe.cn client is hosted on GitHub.
GitHub can host a variety of git libraries and provide a web interface, but unlike other services like SourceForge or Google code, GitHub's unique selling point is the simplicity of branching from another project. Contributing code to a project is simple: first click on the "Fork" button of the project site, then check out the code and add the changes to the code base you just separated, and finally request a code merge from the project owner through the built-in pull request mechanism. GitHub has already been called the code player's MySpace.
Branching on GitHub is like in MySpace (or Facebook ... To make friends, you are constantly wired in the nodes of the social graph.
GitHub uses a git distributed version control system, and Git was originally created by Linus Torvalds to help with Linux development, which is for Linux platforms, so git and windows are never the best friends because it's not like windows 。 GitHub released GitHub for Windows, providing an easy-to-use Git graphics Client for Windows platform developers.
GitHub for Windows
GitHub for Windows is a Metro-style application that integrates the posh-git extension of the self-contained version of the Git,bash command line Shell,powershell. GitHub provides a basic graphical front-end for Windows users to handle most common versioning tasks, creating repositories, submitting patches to the local repository, and synchronizing between local and remote repositories. Microsoft also provides developers with a GIT version control system through CodePlex, and GitHub has created a more compelling version of Windows.
On GitHub is an auto-configured Mac notebook, a tool that can convert settings to Linux or Windows machines.
Boxen is a GitHub automation tool that sets up and configures Mac notebook software development  or other types of work that are being used by their developers, attorneys, designers, shippers, etc. Our idea is to prepare the system in a way that is automated and as error-free as possible with minimal intervention work. On GitHub, with a new development machine, his Mac system is set up and ready to commit code within 30 minutes.
Boxen based on the collection of a large number of dozens of puppet modules, which enables the setup of various software such as Cassandra, MongoDB, Java software, Python and ruby Development, nodes, Js,nginx, Skype, and even Minecraft. Although the machine is equipped with a pre-configured, each user can adjust the role of its configuration.
"How to use"
1. Register your account and create a warehouse
The first step to using GitHub is, of course, registering a GitHub account. After that you can create a warehouse (free users can only build public warehouses), create a New Repository, fill in the name after create, there will be some warehouse configuration information, this is a simple git tutorial.
2. Installing the client Msysgit
GitHub is a server, we need a git client to use git on our own computer, I choose Msysgit here, this just provides the core functionality of Git, and is based on the command line. If you want a graphical interface, just install Tortoisegit on msysgit basis.
After loading the msysgit right mouse will have some more options, in the local repository right-click Git Init here, will be more than a. git folder, which means that the local git created successfully. Right-click Git bash to go to the GIT command line and configure SSH key to upload the local repository to GitHub.
3. Configure Git
First, SSH key is created locally;
[Mw_shl_code=java,true] $ ssh-keygen-t rsa-c "[email protected]" [/mw_shl_code]
Behind the[email protected]Change to your mailbox, then ask to confirm the path and enter the password, we use the default one-way return to the line. Successful words will be generated under ~/. SSH folder, go in, open id_rsa.pub, copy the key inside.
Go back to GitHub, go to account Settings, choose SSH keys,add ssh key,title on the left, and paste the Key. In order to verify success, enter it under GIT bash:
[Mw_shl_code=java,true] $ ssh-t[email protected][/mw_shl_code]
If it is the first time will prompt whether continue, enter Yes will see: You ' ve successfully authenticated, but GitHub does not provide shell access. This means that you have successfully connected to GitHub.
The next thing we need to do is upload the local repository to GitHub, and then we'll have to set up username and email, because GitHub will record them each time it commits.
[mw_shl_code=java,true]$ git config--global user.name "your name"
$ git config--global user.email "[Email protected]"
Go to the repository you want to upload, right-click Git Bash, add remote address:
[Mw_shl_code=java,true] $ git remote add origin[email protected]: Yourname/yourrepo.git [/mw_shl_code]
The following yourname and Yourrepo indicate that you re-github user name and the newly created warehouse, added after the addition of the. git, open config, here will be a remote "origin" content, this is just added to the long-range address, You can also modify config directly to configure the remote address.
4. Submit, Upload
Next, add some files to the local repository, such as the Readme,
[mw_shl_code=java,true]$ git add README
$ git commit-m "First commit" [/mw_shl_code]
Upload to GitHub:
[mw_shl_code=java,true]$ git push Origin master
The git push command pushes the local repository to the remote server.
The git pull command is the opposite.
After modifying the code, use GIT status to view the file differences, use git add to add files to commit, or use Git add-i to add files intelligently. After Git commit commits this modification, git push uploads to GitHub.
Gitignore as the name implies is to tell git to ignore the files, this is a very important and useful file. In general, we write the code after the compilation, debugging and other operations, which will produce a lot of intermediate files and executables, these are not code files, do not need git to manage. We see a lot of these files in git status, and if we add them with Git add-a, it's too cumbersome to add them manually. Then we need to gitignore. For example, General C # projects My. Gitignore is written like this:
Bin and obj are compiled directories, which are not source code, ignore; suo files are vs2010 configuration files, not required. This way you will only see the source code file when you are in Git status, and you can rest assured that Git is add-a.
We can create a tag to point to a key period of software development, such as the version number update can be built with a "v2.0", "v3.1" such as the label, so in the later review will be more convenient. Tag is very simple to use, the main operations are: view tag, create tag, verify tag and share tag, these blog below are detailed explained.
"GitHub's related use articles"
Git Introduction, installation, Git+git flow use: http://my.eoe.cn/fogs/archive/799.html
Git instruction Set: http://my.eoe.cn/iceskysl/archive/463.html
Install the Git-flow process on your Mac: http://my.eoe.cn/iceskysl/archive/118.html
Simple usage of git fetch: Update remote code to local repository: http://my.eoe.cn/com360/archive/3533.html
How git makes a single file fallback to the specified version: http://my.eoe.cn/com360/archive/3351.html
How to use the open source project on GitHub: http://my.eoe.cn/fengyiyezi/archive/3427.html
Window (8) to install Msysgit, Gitflow, github:http://my.eoe.cn/sunxun/archive/158.html
Git hits tag:http://my.eoe.cn/xiayang6/archive/446.html
Open source Project Guide based on GitHub participation in EoE: http://my.eoe.cn/iceskysl/archive/3195.html
Git stash How to use: http://my.eoe.cn/sunxun/archive/190.html
Git tag usage: http://my.eoe.cn/futurexiong/archive/1943.html
Plain English explains how to contribute to the project on GitHub code: http://my.eoe.cn/leigo/archive/3221.html
Finally, we recommend several communities to introduce the posts you know about GitHub:
Use of Githup
egit User manual for Git plugin on Eclipse
setup of Git server under Ubuntu
git, vim, LS global configuration
The above hope for everyone to learn to play a positive role, a good program ape is bound to learn the use of GitHub. If you feel good about this article, tell your friends around, if you feel the past so share it, if you feel you need to change, then please point out the insufficient and give a few e-coins to reward. Finally thanks to Baidu's selfless support, as well as a person's blog (said really really forgot his address is what), Hello Github.
GitHub Tutorial The most complete GitHub use: Getting Started with GitHub to master (from eoeandroid.com)