Install and use git on Windows 7.

Source: Internet
Author: User

Install and use git on Windows 7.

1. Environment Conditions, basic windows environment, github users

2. Download the Git installer and click Next by default.

3. Procedure

View git version

Git-version

Configure the global user name and email address

Git config-global user. name "your name" # configure the global user name

Git config-global user. email "your e-mail" # configure the global mailbox

Git config-list # view configuration information

Create an ssh key for the git server to authorize the local user and generate the id_rsa and id_rsa.pub files (the default is in the C: \ Users \ USERNAME \. ssh folder)

# Open Git Bash and integrate the ssh command internally

Ssh-keygen-t rsa-C "your e-mail"

Add a local ssh Public Key (id_rsa.pub) to the remote git server. Here, github is used as an example.

# Log on to github

# Enable Settings and select set SSH and GPG keys.

# Select New SSH Key and add the content in the id_rsa.pub File

# Test whether the public key is successfully added. Open Git Bash.

Ssh-T git@github.com

Initialize or create a code repository (Project root directory)

Git init # client Initialization

Git init-bare # server Initialization

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.