Git download
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
and leave the rest to the next step.
2 Basic configuration
2.1 Configure username and email
- 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) - 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
- Generate the id_rsa.pub file. Open git bash
in用户名/.ssh
the directory and enter the command
ssh-keygen -t rsa # 后边是加密方式
# 后边直接默认回车即可
# 然后将会生成id_rsa.pub文件
- 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: ③
3 basic commands
4 Integrate git into Idea
4.1 Set up Idea
- Select the git you installed
- Install gitee plugin
- Login to gitee
4.2 Idea uses Git
-
Share projects to gitee
-
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 -
Shortcut keys
Ctrl+k
:commit
Ctrl+Shift+k
:push