How to install and configure GitHub

Source: Internet
Author: User
Tags git client
Git Introduction

Distributed: The GIT version control system is a distributed system and a command line tool used to save the historical state of the project source code;

Save point: the GIT save point can track files in the source code and get the status of the entire project at a certain point in time. You can merge the source code submitted by multiple users at this save point, it can also be returned to a storage point;

Git offline Operability: git can submit code offline, so it can be called completely distributed processing, and all git operations do not need to be done online; this means that git is much faster than SVN and other tools, because SVN and other tools need to be operated online. If the network environment is poor, code submission will become very slow;

Git snapshot-based: old version control tools such as SVN Save the submission point as a patch file, and git commit points to the project snapshot at the time of submission, the submitted items include metadata (author, date, GPG, etc );

Git branch and merge: The branch model is the most significant feature of git, because it changes the developer's development mode, and version control tools such as SVN place each branch in a different directory, git can switch different branches in the same directory;
Instant branch: the process of creating and switching branches is almost the same. You can upload some branches, and other branches can be hidden locally, without uploading all the branches to GitHub;

Branch flexibility: You can create, merge, and delete branches at any time. Multiple people can implement different functions. You can create multiple branches for development, and then merge branches. This method makes development fast and simple, security.

Git general client official

Http://git-scm.com/

Install git Software

Welcome Page: Go to the next step;

Protocol: required;

Installation location: MB space is reserved and the installation location is customized;

Select to install components: You can also select by default;
-Addition icons: Select whether to create the Quick Start bar icon or whether to create a desktop shortcut;
-Windows Explorer integration: You can view the source code. You can only use Bash or git GUI for context browsing. You can use the git-Cheetah plugin for advanced context browsing;
-Associated configuration file: whether to associate the GIT configuration file. The configuration file displays the text editor style;
-Associate shell script files: whether to associate the script files executed by the bash command line;
-Use TrueType encoding: whether to use truthtype encoding in the command line. This encoding is a general encoding developed by Microsoft and Apple;

Shortcut menu: set the name of the shortcut directory in the Start menu. You can also choose not to create a shortcut in the shortcut menu;

Set environment variables: select the command line tool. Generally, git Bash is used by default;
-Git: Use the GIT bash command line tool that comes with git;
-Built-in cmd: a command line tool for Windows;
-Both of them: both are configured at the same time, but note that this will overwrite the find.exe and sort.exe tools in windows. If you do not understand these tools, try not to select them;

Select the line feed format:
-Convert Windows format to Unix format: Convert Windows format to Unix format before submitting;
-Check whether the original format is converted to the Unix format: regardless of the format, the line feed will be converted to the Unix format before submission;
-Do not convert the format: Do not convert the file. Submit the file if you check the file;

Start installation:

Installation is complete: over;

Configure GitHub

Right-click git bash in the Start menu and modify the GIT bash configuration. Set git Bash to the quick edit mode to better use this command line tool:

Create local SSH (a method for transferring code, fast and secure. For details, go to Baidu to check the information) (you can also select HTTPS transmission. skip this step .)
ssh-keygen -t rsa -C "[email protected]"

GitHub Email: the email address after this command is the registered email address of GitHub;
Path Selection: After the command is run, a prompt is displayed, indicating to select the ssh-Key Generation path. Click Enter to generate the default path. The generated ssh-key is in the default path;
Password confirmation: here we do not use the password to log on, it is too troublesome to use the password;

Configure SSH to GitHub

Enter the generated SSH Directory: C: \ Documents ents and Settings \ Administrator \. SSH (or c: \ Users \ User Name \. SSH), use NotePad to open the id_rsa.pub file and copy the content of the file;
Id_rsa.pub file content:

ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtT1YCeaNulpfC+ARqAWrCdfpi6CpW3gkGT0hp6Q8by7NnEfy4dah9CwSrNbWJH5eS4tiqckE+bdbSVNvAboFD1MtGZjtzE4GDweG/6J/SDYV/ADFN/RLWGb+5rQ8wMCjc/fODgLJDFxk1Fwk/TTqTcbtLab1toLcts3zGIW5DstA3RQ0CCX/sPew5m7vh7DcKXluj2TBd9hw== [email protected]

Go to the GitHub Website: log on to GitHub and select account setting user settings:

Select SSH-KEY options on the left:

Click Add SSH key on the right:

Copy the ssh-key copied above:

Verify whether the configuration is successful:

ssh -T [email protected]

You may be asked to enter Yes during verification.

Success prompt: If Hi han1202012 appears! You 've successfully authenticated, but GitHub does not provide shell access. It indicates that the configuration is successful and you can connect to GitHub;

Configure local users and mailboxes

User name email function: we need to set a user name and email address, which is used to upload the local repository to GitHub and display the code Uploader in GitHub;
Run the following command:

Git config -- global user. Name "hanshuliang" // set the username git config -- global user. Email "[email protected]" // set the mailbox

By now, the GIT client has been installed and configured on GitHub, and code can be transferred from GitHub.

Set the default path for git local project development library

If it is set, you do not need to open git and then CD to open the directory each time. Method: Right-click the GIT shortcut icon (GIT bash), find the shortcut-start position, and put your project address here. For example:

Related Articles: git version control software, combined with GitHub, provides a learning manual on getting started and mastering Common commands

Reprinted Please note: Love Sharing» git client graphic details how to install and configure GitHub operation procedure strategy
Address: http://www.ihref.com/read-16377.html

 

How to install and configure GitHub

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.