1. Basic introduction
1. IntelliJ-IDEA pre-installed version control introduction
Let's look at the version control settings area of IntelliJ-IDEA and
open File>Settings>Version Control
to see that there are git plugins in it
This makes many people think that IntelliJ IDEA comes with version control tools such as SVN or Git, and that as long as IntelliJ IDEA is installed, it can fully use the functions of version control. This is a completely wrong interpretation. IntelliJ IDEA comes with support plug-ins for these version control tools, but the version control client that should be installed still needs to be installed.
As you can see above, it also comes with a github plugin, this is because too many people currently use Github for collaboration or project version management
2. Configuration of git.exe and Github
1. Configure git.exe
Make sure you have Git and TortoiseGit installed on your computer and
then configure the git client
Use of Gitlab
Gitlab is similar to Github in that they are both code hosting websites. The biggest difference is that projects created by Gitlab can be privately owned for free and do not have to be charged like Github, and Gitlab can also build its own private server. Therefore, open source projects are generally placed on Github, personal private projects can be placed on Gitlab on the public network, and company private projects can be placed on Gitlab built by themselves.
1. Create a project
2. Operate on the project
After the project is created, you can click on the upper left corner to view
and click on Project, you can see the list
of projects. You can add a README.md to the project and then
clone the specified project. Use Git on IntellIj-IDEA to clone it as shown in the figure above. When checking out the project, because it is not Github, you no longer choose Github, but choose ordinary Git to clone the project. Finally, enter the password, and then clone it and clone it. After that, the project structure is as follows: At this time, normal add, commit, and push operations can be performed.
3. Publish the project to gitlab
First create a project locally
and add the project to version control.
After adding it to version control, we can see that the files have turned green.
Then submit the project locally and
fill in the relevant information to be submitted.
Note that perform code analysis is not checked. This option will automatically check the code, which will be very slow.
Then push the project to the server and
click push .
Next, you need to define the remote service.
At this time, you need to set the url in the pop-up box. We first create a new project in gitlab. The purpose is to After obtaining the relevant url
, fill in the url, and then click push.
At this time, you also need to fill in the password on gitlab.
After the push is successful, such a prompt will appear. This is a successful prompt:
check the project information on gitlab again, and you can see the submitted code , as shown in the figure below