This article has participated in the third “topic writing” track at the Diggings Creators Camp. For more details, check out diggings program | Creators Camp.

The preface

I believe that many partners are using Idea for development, in daily development, need to frequently use Gite, Gitee provides the original command form, although not troublesome, but always need to switch back and forth between Idea and Git graphical interface, inevitably some unaccustomed, in fact, Idea is integrated with Git.

First, let’s review what Git is.

Git is an open source distributed version control system for handling any project, small or large, with agility and efficiency. It was written in two weeks by Linus Torvalds (Linux), an open source version control software developed to help manage Linux kernel development. Git is different from the commonly used version control tools such as CVS and Subversion. It adopts the distributed version library and does not need to be supported by server-side software.

Create a test project

Without further details, we will create a new Maven project for testing, and it will not matter whether the Mvaen skeleton is used or not.

Integration began

Initialize git

The first sentence of the command line is:

git init
Copy the code

This step of Idea is to replace this sentence and initialize it.

Select the Git

As we can see, his color has changed, or sai.

Create a new test repository on Gitee

Why Gitee over Github? Or is it fast?! You can also use Github.

The warehouse information can be customized, so I wrote one at random.

Click the COPY repository’s HTTPS address for standby.

Back to the idea

Right-click the project and go to Git->Manage Remotes.

Click the + sign to add a 1 remote warehouse address.

Copy that HTTPS address

Click OK and you can see that the join is successful.

Right-click the project and add the project Add to the staging area.

Right-click the project and find the Commit Directory.

Enter the information submitted this time, and you can enter the information about the changes made in this 1. Finally, click Commit.

Appear this frame also ignore him, I am 1 to commit.

Right-click the project and find push.

Click on the Push

If a pop-up box appears, the push is successful!

Refresh the repository we just created!

conclusion

Here is the end, is not very simple! For those of you who are not familiar with Git, check out my previous blog: Git Babysitter Teaching for Work.