[Git] Git's GUI graphical tool &ssh protocol &IDEA integrates Git

1. GUI graphical tool for GIT

1 Introduction

        The GUI tool that comes with Git, the meaning of each button in the main interface is basically the same as the interface text, and is not much different from the git commands. After understanding the operations you are doing, you can click on each function to know how it operates. Even if you don't understand it, as long as you don't perform push operations, all operations are performed locally and there will be basically no impact.

2. Use

  1. Create a new warehouse in Git in advance and perform some basic operations.
  2. Right-click your mouseGit GUI Here 
  3. The operation corresponding to this selection appears.
    1. Select the corresponding path to open and operate.
    2. Select what you want to clone
      ①Clone address
      ②Local file path
    3. Open the already created repository
    1. uncommitted documents
    2. Already temporarily stored
    3. Where to write comments when submitting
  4. operate
    1. ProposalNew text
      1. SelectingText item.
      2. commitsupply or copynote.
      3. push 
    2. ProposalRevised text
      1. Perform the same operation as above, but the file will be displayed slightly differently.
  5. Finish

2. ssh protocol

1. What is ssh key?

        SSH key is a key-based authentication method used for remote SSH connections. It includes a private key and a public key. The private key is stored on the client computer, while the public key is placed on the server. When a client attempts to connect to the server, the server asks the client for a private key for authentication. If the verification is successful, the client will be able to communicate with the server through the SSH protocol.

2. Use

2.1. Generate key

Right-click on a blank space and select Git Bash Here to open the relevant command window. 

  1. Configure user name and email (if already configured, skip)
         git config --global user.name "username" /span>File with contentC:\Users\xxx.gitconfig< will be created under Then a emailgit config --global user.email ""
         
         [user]
         name = xxx
         email = [email protected]

    username and email are git'slogin accountandregistration email.

  2. Check whether you have generated ssh before
         cd ~/.ssh
         ls

    Whencd ~/.ssh the window returns "no such file or directory< /span>", it means that our computer does not have an ssh key, so we need to create an ssh key

  3. Generate (or delete) public key
    ssh-keygen -t rsa -C "Email"

    Email is the registered email address. It can be generated by pressing Enter three times after running.

  4. C:\Users\xxx\.sshThe following files with the following two names are generated: 
           id_rsa(Private key, cannot be leaked)
           id_rsa.pub(Public key)

2.2. Warehouse configuration

  1. Log in to your own Git and click on the small inverted triangle in the upper right corner. Select Settings.
  2. SelectSSH public.
  3. Fill in atitle, and then paste the id_rsa.pub< you just copied a i=4>Text toPublic Key, click OK.
  4. Sometimes the Git official website will ask you to enter your login password to add, just enter the password.

2.3. Cloning

  1. Copy the SSH address that needs to be cloned.
  2. Select the location you want to clone, right-click Git Bash Here.
  3. git clone [url]
  4. 出现:Are you sure you want to continue connecting (yes/no/[fingerprint])? 选择yes
  5. Complete cloning

3. IDEA integrates GIT

1. Configure the installation path

To integrateGit intoIntelliJ IDEA, You can follow these steps:

  1. OpenIntelliJ IDEACustomer.
  2. ClickFile and selectSettings.
  3. In the settings window, selectVersion Control and clickGit.
  4. In the Git settings window, select the path drop-down menu and selectGit\bin\git.exethe installation path.
  5. Click the OK button to save the settings.

2. Download the Git plug-in

  1. ClickFile and selectSettings in the pop-up menu
  2. selectarticle, searchgitee, download.

3. Log in user

Find hereVersion ControlGitee 》 Select the correspondinglogin method to log in.

  1. Login via gitee
    1. Click and follow the operation
  2. Log in with password
    1. Use your login account and password to log in. This method is still very easy to log in.
  3. Log in using token
    1. EnterPrivate Token - Gitee.com and enter Settings
    2. If there is no token setting, it is still easy to operate.
    3. Copy your token, check it, and log in
  4. Complete login

4. Submit code cloud

  1. Git Gitee Share Project on Gitee 
  2. Basic presentation copy, availablePrivately owned,Share ,Waiting for a long time.
  3. Select project files
  4. Submission completed

5. Clone

  1. Select the cloned SSH.
  2. Select clone
  3. Paste the copied SSH address into it
  4. Modify the project configuration and complete the cloning

6. Submit problem resolution

If members and administrators perform change, add, delete operations.

A pop-up window will appear, allowing you to choose to merge or perform other operations.

Selecting Merge will show the administrator's and other members' methods. We can communicate and agree on deletion and modification. Last commit push.

Guess you like

Origin blog.csdn.net/weixin_74383330/article/details/134324744