The installation and configuration tutorial for Git bash

Source: Internet
Author: User
Tags config svn ssh git client version control system

Distributed: Git version control system is a distributed system, which is used to save the history state of Engineering Source code command line tools;

Save point: Git save point can track files in the source code, and can get the whole project amount at a certain point in time; You can merge the source code that is submitted by many people at the save point, or you can retreat to a savepoint.

git offline operability: git can be offline for code submission, so it's called full distributed processing, and all of Git's operations do not need to be done online; This means that git is much faster than SVN and so on, because tools such as SVN need to be online to operate, and if the network environment is bad, submitting code can become very slow;

Git is based on snapshots: The old version control tool such as SVN is to save the submission point as a patch file, and Git commits to point the submission to the project snapshot at the time of submission, and the submission contains some metadata (author, date, GPG, etc.);

The branching and merging of git: The branching model is the most notable feature of Git, because it changes the developer's development model, and SVN and other version control tools place each branch in a different directory, and git can switch between different branches in the same directory;
Branching immediacy: Creating and switching branches is almost simultaneous, users can upload part of the branch, another part of the branch can be hidden in the local, do not have all the branches uploaded to the GitHub;

Branching flexibility: Users can create merge deletion branches at any time, many people implement different functions, can create multiple branches for development, and then branch merge, which makes development fast, simple and secure.

My blog: Code encyclopedia: www.codedq.net; amateur grass: www.xttblog.com; love to share: www.ndislwf.com or ifxvn.com.
git generic client official download address

Http://git-scm.com/downloads git Software Installation

Welcome interface: Direct next step;

Agreement: must accept;

Installation location: Reserved 100M space, custom installation location;

Select Installation components: You can also choose by default;

My blog: Code encyclopedia: www.codedq.net; amateur grass: www.xttblog.com; love to share: www.ndislwf.com or ifxvn.com.
-Icon Component (addition icons): Choose whether to create a Quick Launch bar icon or create a desktop shortcut;
-Desktop Browsing (Windows Explorer integration): Browse the source method, separate context browsing using only bash or git GUI tools only; The advanced context browsing method uses Git-cheetah plugin plug-ins;
-Association Profile: whether to associate a Git profile that mainly displays the style of the text editor;
-Associated shell script file: whether to associate a script file executed by the bash command line;
-Use TrueType Encoding: Whether Truthtype encoding is used on the command line, which is a common code developed by Microsoft and Apple;

Start Menu Shortcuts Directory: Set the directory name of the shortcut in the Start menu, or you can choose to no longer start the menu to create a shortcut;

Setting environment variables: Choose which command-line tools to use, and in general we use GIT bash by default, the default choice;
-git: Use Git's own git bash command line tool;
-System with cmd: command line tools using Windows system;
-both: They are configured at the same time, but note that this will cover the Find.exe and Sort.exe tools in Windows, if you don't understand these, try not to choose;

Select a newline format:
-Check out the conversion of Windows format to UNIX format: a newline in Windows format in UNIX format is submitted;
-Check out the original format into UNIX format: No matter what format, all converted to UNIX-style line in the submission;
-No format conversion: Do not convert, check out what, submit what;

To begin the installation:

Installation end: over;

Configure GitHub

In the Start menu find Git bash right-click Properties and modify Git bash's configuration: set git bash to quick edit mode to better use this command-line tool:

My blog: Code encyclopedia: www.codedq.net; amateur grass: www.xttblog.com; love to share: www.ndislwf.com or ifxvn.com.

Create a local ssh (a way to transfer code that is fast and secure.) Detailed can go to Baidu search data) (also can choose HTTPS transmission, then skip this step. )

Ssh-keygen-t rsa-c "13241153187@163.com"

GitHub mailbox: The mailbox behind the command is GitHub's registered mailbox;
Path selection: After using this command, you will be prompted to select the Ssh-key build path, where you can directly click the default, generated Ssh-key in the default path;
Password Confirmation: Here we do not use the password to login, with the password too troublesome;

to configure SSH into GitHub

Enter the generated SSH directory: C:\Documents and Settings\administrator\.ssh (or C:\Users\ your own computer username \.ssh), use Notepad to open the Id_rsa.pub file and copy the contents of the file ;
Id_rsa.pub File Contents:

Ssh-rsa aaaab3nzac1yc2eaaaabiwaaaqeatt1yceanulpfc+arqawrcdfpi6cpw3gkgt0hp6q8by7nnefy4dah9cwsrnbwjh5es4tiqcke+ bdbsvnvabofd1mtgzjtze4gdweg/6j/sdyv/adfn/rlwgb+5rq8wmcjc/fodgljdfxk1fwk/ttqtcbtlab1tolcts3zgiw5dsta3rq0ccx/ spew5m7vh7dckxluj2tbd9hw== 13241153187@163.com

Enter GitHub website: Login github, select account Setting user settings:

Select the Ssh-key option on the left:

Click on the Add SSH key on the right:

Copy the Ssh-key copy in:

Verify that the configuration is successful:

Ssh-t git@github.com

Validation may allow you to enter Yes.

Success Tip: If Hi han1202012! appears You have ' ve successfully authenticated, but GitHub does not provide shell access. On the description of successful configuration, you can connect to the GitHub;

Configuring Local Users and Mailboxes my Blog: Code Encyclopedia: www.codedq.net: www.xttblog.com; Love sharing: www.ndislwf.com or ifxvn.com.

User Name Mailbox role: We need to set a username and mailbox, which is used to upload the local warehouse to the GitHub, in the GitHub display code upload;
To use the command:

git config--global user.name "Hanshuliang"//Set user name 
git config--global user.email "13241153187@163.com"//Set Mailbox

The GIT client has been installed and GitHub configured to complete and can now transfer code from GitHub. set git local project development Library default path

If you set it, you don't have to open the directory every time you open git and CD. Method: Right-click git shortcut icon (name: Git Bash), find the shortcut-start position, put your project address here. The following figure:

My blog: Code encyclopedia: www.codedq.net; amateur grass: www.xttblog.com; love to share: www.ndislwf.com or ifxvn.com.

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.