This article is my own writing about GitHub, and from what I've just heard, there are detailed steps to explain every step of the way, with some screenshots or code coming from the Web.
First, I'll start with a simple introduction to GitHub, GitHub has a very powerful function is that you can create a library above the server (later on how to create), writing code is a very heavy task, especially when many people complete a large project, it is very complex, A group of people to write a project, everyone completed the time, the completion of the progress is not the same, you write a little bit I write a little, maybe even you write a mistake today, affecting the code I wrote yesterday, finally how to put everyone's code easily summed up, And how to summarize all the code after everyone found errors and so on a series of problems. So we use the GitHub software. We have a main warehouse on the GitHub server that stores all of your code, and if you don't want anyone to see your code, you can choose a paid warehouse. Once we have created the main warehouse, we can create branches on the computer, then you can complete your own code on the computer, after writing the direct synchronization in the computer branch, when you think you can upload their own main warehouse, you can apply for updates, when passing the audit, your code appears in the main warehouse of their own, So programmers all over the world can look at your code. The world now has 3 million registered users, and even some quite well-known open source projects in which the code is published. On GitHub you can see many of the computer field's elite share their own code. This is the two key benefits of GitHub, suitable for teamwork, and for downloading other good People's code.
Today, GitHub is: a community of 1.43 million developers. Among them are the top hackers such as Linux inventor Torvalds, and the young geeks such as Rails founder DHH.
· The most popular open source hosting service on the planet. Currently hosting 4.31 million Git projects, not only are more and more well-known open source projects moved into GitHub, such as Ruby on Rails, JQuery, Ruby, ERLANG/OTP, and nearly three years of popular open source libraries often in GitHub, such as: BootStrap, Node.js, Coffescript and so on. Alexa global ranking of 414 sites.
https://github.com/This is the official website of GitHub, can register own GitHub account on official net, online is the whole English, for English bad classmate suggest to use Google Browser, Google Browser can translate the webpage becomes Chinese use very convenient.
After the simple steps you will have a GitHub account of your own. After the simple registration, you will need to verify that you entered the mailbox to normal use of your github.
After the registration is complete, you'll need to create a library of your own after you've done some simple setup.
After landing your GitHub account, the small plus sign in the top right corner of the page is the button to create your own library, after which you can create your own library by following the steps to translate the page into Chinese.
The first box is a name for your own library, and the second box is a brief introduction to your library.
After creating your own library, the next step is to have your computer clone a library that you created, with the code on your computer synchronized to the library you created GitHub.
To achieve this, you need to install a software Git Bash.
Next I will introduce the installation of this software, as well as simple configuration.
Git-scm.com first into the GitHub official website, download the appropriate version of their own computer
Run after downloading the installation package
The direct default option is available during installation.
When you configure Git bash, most beginners are confused, and I have a detailed record of each step of the configuration below. Code I also from the Internet and seniors over there to come.
The first time I opened the software to see the interface is also a face, and then through a variety of information to have a number of ideas.
First to create an SSH key locally this is what you need to get a key on your computer right now, the same thing that we do in our usual captcha, and after that, after you enter your GitHub account, your computer is connected to your GitHub account, This will make it easy to upload your code at any time through Git bash. Here is a description of how to enter your github if you get the key.
The first time a lot of people open this github when a face to think that this is what. For a novice to see this is no idea, no idea.
This column starts with the name of your computer in my here is Hanani @ behind the content is your computer model, many times some people open after the @ is garbled, this time also do not care, because some computer models are Chinese, may appear in the time of the problem, does not affect your later operation.
Next, start getting your own keys. All of the features in Git bash are implemented by simple code. You need to enter when you get the key
$ ssh-keygen-t rsa-c "your_email@youremail.com"
This code needs to be entered, and the quotation marks need to be changed to the email account that you bind when registering the GitHub. Then there will be some simple to confirm the operation, then you will be prompted to operate the path, password and so on, under normal circumstances directly to press the return of a passing on.
If you later appear in this interface, it means that your key has been successfully created. Now you need to go to the storage location that he just showed up and copy the contents of it.
In the. SSH folder
Then you will see the content, some people will be behind the id_rsa with a pub, before looking at the online tutorials need to find a file with pub, because I did not bring after the generation. pub files, with disturbed heart open Id_rsa found here side of the key is also available. You need to open the Id_rsa in Notepad.
Ssh-rsa aaaab3nzac1yc2eaaaadaqabaaabaqdiskxqzf3ssftack6zongjabiktbc3kig6+ 4j4dcq1tswha9ykujci0wprmgywbq67dyt2or7redfzlullzn3nl6awlo5v2jrxw4wqxcon2ru1p122wmitzqyofsykjwullwv4byczu4n77a4/ 9wwlsqzcpebcdwv8imkvwfjuinswqtvmymcktwu8yad5dz2v7lbwfgsl/tfx7aeb8ujdnj6spw30yijy+ 62yrftyggbuwoil9hdngo2lfjgokglhtbjaze31uqllwc5uczd+7dgh7rakmmeuz2uv7yqm/ IEU9JH8CPMR9YRPIHMZG38G2S9ILN27QQW9J1HRFY1V 15229020556@163.com
This is the key that I get, open a long time, don't be surprised, no problem, this is the key you need.
Now you need to login to the top of your github to add this key,
To open your GitHub Setup interface and find the SSH and GPG keys option, there is a new SSH keys click in the top right corner of the page
The title here is to let you give your key a name, according to personal preferences, any name can be, and then the copy of the key you have just copied in the file, fill in the big box below. can be saved.
And then you can go back to the top of your git bash.
Then enter the code above to check for successful binding. When you first bind, enter the top of the code will prompt whether continue, after the input yes if it appears: You ' ve successfully authenticated, but GitHub does the not provide shell access. That means that it has been successfully connected to the GitHub. The next step is to simply set something up.
Enter the code above, name best and GitHub, email is a must register github that email address
The order of these two can be reversed, not in a fixed order.
Below will be cloned your library to the local computer, easy to upload code later.
After the library is created, a URL appears in the Web page.
Personal habits Store your files in D, so you first need to locate Git bash in D-disk
Enter the cd/d note disk name in Git bash must be capitalized. If you do not enter this statement and do not position git bash, the default local file location is in the C disk.
A/D description appears after the input is successful.
And then enter
The URL behind git clone is the URL after the successful creation of your library
And then open the D disk that I'm targeting.
As you can see, there are already folders in the D disk that were created with my library name.
Open this folder, and then create a file in any format, any name.
Then reposition git to position the book in the folder of your library.
Then the role of input LS statement LS is to look at the files in the folder you are currently locating, and now you can see that the test file I just created already appears.
Then enter git add test.txt
After that, enter and then git commit-m "CC" quotes within the content can be arbitrarily changed, this statement means to give you just uploaded a note of the file, easy to find memory.
This occurs after the input, and then after you enter GIT push Origin master, you will receive a
Interface, click Login after landing your previously registered GitHub account.
If this happens later, the landing failed, and then you need to enter your GitHub account name
This interface will appear after the input, and then enter your GitHub password again.
The appearance of similar interface, you can cheer, on behalf of your success.
Now open your GitHub Web site and find the library you created.
Finding out that the grid is green today means you've uploaded the file you just created.
After that, you just have to put your code in the corresponding folder in the library, and then use, git Add, git commit-m "", and finally git push Origin master to submit your code to it.
Turn from: http://blog.csdn.net/Hanani_Jia/article/details/77950594