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