GitHub structures and simple to use

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

Recently, and students to do a small project, in every integration is always use U disk to copy is not convenient, so on their own learning and to build a GitHub project source code management, and is convenient for the communication between us. Now and share with you:          

GitHub is based on a managed code platform git, the registration time for paid and free two. Subscribers can build private warehouse, of course for us to use free way can, free users can only use the public warehouse, code to open, the need to register in time selection. We get down to business.

1, The registered account and create warehouse

First we have to register an account.

After registration you can create a warehouse, need here is that you create a warehouse (free users can build public warehouse), Create a New Repository, to write on their own to create the warehouse's name is Create, then there will be some warehouse configuration information. This can see the corresponding git tutorial.    

2, Install the Git client

Because I was built in Linux, windows have not tried, not dare to say. I now take my system as an example. My system is 64 Fedora 18. There should be inside the GIT source, so the implementation in the root user:

  1. $ yum install git

3, The configuration of Git

First, to create the SSH key in the local

  1. $ ssh-keygen -t rsa -C ""
Double quotation marks inside your own mailbox, then prompted to confirm the path and enter a password, this way we enter. If successful it will generate the.Ssh directory in the current directory, CD.Ssh into the SSH directory on the, copy the file key (documents). Go back to the Webpage in GitHub, in Account Setting, select the left SSH Keys, Add SSH Key, title just fill, this does not matter, then paste key. Of course, if you want to test your configuration is successful can use the following command:
  1. $ ssh -T
If this is the first time would be prompted to input continue, yes will see: You've successfully authenticated, but GitHub does not provide shell access. This means that you have already successfully connected to GitHub.
Then we need to put the local repository to the GitHub, before this, you need to set the username and email, because the GitHub every time commit will record their.
  1. $ git config --global "your name"
  2. $ git config --global ""
Enter to upload the warehouse, and then add the remote address:

  1. $ git remote add origin
  2. $

YourName is your GitHub username, yourRepo you just newly built warehouses, after entering the.Git, open the config, there will be more of a remote "origin" content, it is just added a remote address, can also directly modify the config and configure the remote address.

4, Submit, upload code  

The following two commands:

  1. $ git add yourfile
  2. $ git commit -m "first"

Of course, yourfile is you have to submit the file name, quotes the contents of second command is your submission of a simple description.

And then to the local warehouse to the remote server:

  1. $ git push origin master

5, Download code

This command is:

  1. $ git clone
Clone is behind you to download the address of URL, generally in the current page.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Cyril at December 10, 2013 - 9:09 AM