Begin using Git (Part1)-Git installation and configuration

Source: Internet
Author: User
Tags using git

GIT provides clients for Linux, Windows, OSX, and this section takes Windows as an example of basic installation and configuration.

Tools Required: Msysgit, KDIFF3.

    • Get Windows Installer on https://git-for-windows.github.io/
    • Get Merge tool KDIFF3 on Http://sourceforge.net/projects/kdiff3/files/latest/download?source=files

Under any directory in Windows Explorer, right-click on git bash here and go to git command prompt.

To configure identity information:

$ git config--global user.name "John Doe"

$ git config--global user.email [email protected]

To configure the merge tool:

$ git config--global merge.tool kdiff

$ git config--global mergetool.kdiff3.path "Your path to Kdiff3.exe"

Configure SSH as prompted:

    • Check if SSH is configured, and if configured, the following command will return several files similar to Id_rsa, Id_rsa.pub.

$ ls ~/.ssh

    • Generate Public/private key. If prompted, skip the password to leave it blank.

$ ssh-keygen-t rsa-b 4096-c "[Email protected]"

    • Make sure the ssh-agent is turned on.

$ ssh-agent-s

    • Add private key to Ssh-agent.

$ Ssh-add ~/.ssh/id_rsa

    • Copy the public key to the Clipboard and paste it into remote server profile.

$ clip < ~/.ssh/id_rsa.pub

For example, in GitHub you can find the SSH keys menu in profile->personal settings:

Now that the basic configuration is complete, you can use the preconfigured identity clone repository, commit the code, and more.

Begin using Git (Part1)-Git installation and configuration

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.