Git download, installation, configuration and use (minimalist version)


Note: This document is mainly used for the overall idea of ​​self-examination and explanation. In order to avoid wasting time and reducing enthusiasm for learning, it is not recommended for newbies to check it out without guidance! ! !

1 git download

1.1 Download address

Official website: http://npm.taobao.org/mirrors/git-for-windows/
Due to the slow download speed of the official website, here is the recommendation:
    Taobao mirror station: http://npm.taobao.org/mirrors/
    Git windows version download Address: http://npm.taobao.org/mirrors/git-for-windows/

1.2 Release Notes

Taobao mirror git version description is omitted.

1.3 Installation

Use Notepad++ as the default editor
Insert image description here
and leave the rest to the next step.

2 Basic configuration

2.1 Configure username and email

  1. Check the configured user name and email address (just know it)
    git config --global --list(User configuration file location: C:\Users\个人用户名\.gitconfig)
    git config -l(All configuration information, global configuration file location: Installation parent directory\Git\etc\gitconfig, just know it here)
  2. Configure username and email (key point)
    git config --global user.name "Sky"# Configure username
    git config --global user.email 邮箱地址# Configure email

2.2 Bind code cloud gitee

  1. Generate the id_rsa.pub file. Open git bash
    in 用户名/.sshthe directory and enter the command
ssh-keygen -t rsa		# 后边是加密方式
# 后边直接默认回车即可
# 然后将会生成id_rsa.pub文件
  1. Add the public key to Code Cloud.
    Open the id_rsa.pub file, copy all the contents, and paste it into the public key location ③ of the Code Cloud website.
    The public key location of the code cloud website: ③
    Code cloud adds ssh public key

3 basic commands

Insert image description here

4 Integrate git into Idea

4.1 Set up Idea

  1. Select the git you installed
    Insert image description here
  2. Install gitee plugin
    Insert image description here
  3. Login to gitee
    Insert image description here

4.2 Idea uses Git

  1. Share projects to gitee
    Insert image description here

  2. There are three operation methods:
    1: Right-click the project file and select git-select the operation type
    2: Command line operation below
    3: Shortcut key operation

  3. Shortcut keys
    Ctrl+k: commit
    Ctrl+Shift+k:push

Guess you like

Origin blog.csdn.net/qq_38662733/article/details/120262979
Recommended