Hello, everyone. Today, we are going to introduce how to create a Git repository using IntelliJ IDEA. The process of creating a Git repository in IntelliJ IDEA can be divided into two scenarios: creating a new Git repository using Git Init and directly cloning a repository from a remote Git service to your local machine. Before we start, please make sure that your IntelliJ IDEA is already linked with GitHub. If you’re unsure how to do this, you can refer to EP1 or EP2 of this tutorial series for instructions on linking.
The version of IntelliJ IDEA I’m using for this demonstration is 2023.2.x (Community Edition).
Git Init Operation
1.Click on Projects and then click on New Project.

2.In the popped-up New Project window, fill in the following details: 1. Project name 2. Project location 3. Check the option for Create Git Repository. Finally, click the Create button in the bottom right corner.

3.During the project creation process, if you see a Microsoft Defender configuration message in the bottom right corner, simply click Automatically.

4.After the project is created, you can click on the Git panel in the bottom left corner and select the Console tab. Here, you’ll notice that IntelliJ IDEA automatically executed the Git Init command in the background.

Git Clone Operation
1.Click on Projects and then click on Get from VCS.

2.Click on GitHub. Next, you’ll see a panel on the right with: 1. Search box 2. Project list 3. Project storage location. In case of a large number of projects, you can use the search box to find the project you need.

3.After selecting the repository, you’ll notice that IntelliJ IDEA automatically uses the project’s name as the local project storage folder name. If you’re not satisfied with this location, you can click on the folder icon on the right to quickly choose your desired storage location. Once confirmed, click the Clone button below, and IntelliJ IDEA will automatically perform the Git Clone operation.

4.When the Git Clone operation is completed, IntelliJ IDEA will automatically open the project and take you to the code editing interface.




