Download and configure git and register gitee, use IDEA for file management

1. git download

1. git official website

Githttps://git-scm.com/

2. git download

 

The download may be a little slow, but the file is not large, so you need to wait patiently. You can also use the x64 version I downloaded

Link: https://pan.baidu.com/s/1FcYer0nYyGGHBhrx7LXj_g?pwd=phltExtraction 
code: phlt 

3. git installation

After downloading, click to open and this will be the installation. Except that it is not recommended to build on the c drive, you can directly next to the back.

4. git configuration

        After the installation is complete, you will have two more options when you right-click the mouse. Click Git Bash Here.

Execute the git command and the following will appear, which means the installation is successful.

 

2. Register on gitee

Gitee - Git-based code hosting and R&D collaboration platform https://gitee.com/

 After registration is completed, bind your email for verification. It is recommended that email verification be completed on a computer to avoid errors.

 
Then go back to the git configuration section:

Once we have the username and email, we can configure it in git

 

//用户名配置指令

git config --global user.name "xxx"     (xxx部分是你注册gitee的用户名)


//邮箱配置

git config --global user.email "xxx"   (xxx部分是你注册gitee绑定的邮箱)

 After the configuration is completed, you can check whether the configuration is completed through the command

git config --global --list

generate ssh

Here we refer to the following method, and then find the part of your public key and copy it in Personal Settings->Security Settings->SSH Public Key Paste Git Download, Installation and Environment Configuration_Tanghu Lu’s Little Black Room Blog-CSDN Blog_git Installation and Configuration 1 , git download and installation Baidu git official website, download link, download the corresponding installation package according to your computer system, download the latest version, click on the red box or basket to click on the downloaded installation package to install the software and keep clicking next until it appears install, click install, and click finish after the installation is complete: After installation, click the right button of the mouse on the desktop interface, and the following interface will appear to check whether git is installed OK. Keyboard Ctrl+r, then enter and exit cdm in the pop-up box, and the following interface will pop up... https ://blog.csdn.net/huangqqdy/article/details/83032408

 

3. Configure and manage git files in IDEA

For the convenience of testing, you can create a new warehouse here. Just create a new one casually.

 

 

 2. After creating the new warehouse address, we import it in IDEA

First we need to copy this address

 Open IDEA and select File-->New

 At this point we have imported the contents of our newly created warehouse into our idea.

3. Then we need to configure IDEA, otherwise we will not be able to push our modifications. This is very important. 

 

4. Give it a try

 5. Pay attention to the problem *

git: error unsafe repository

This problem will occur when you commit for the first time. Idea will prompt you that you can pass

git config --global --add safe.directory/directory   to solve,

At this point we can paste in the git command line, and then we pass:

git config --global --list  view

 6. Submit changes

 

 Then we can see that it has been submitted successfully

 We can also see on gitee that the commit has been successful.

 

Guess you like

Origin blog.csdn.net/m0_56233309/article/details/125183236