Ignore files that do not need to be submitted to github through IntelliJ IDEA

Nowadays, there are more and more open source projects, and the storage containers mainly include github and the domestic code cloud. Open source contributions are also an important criterion for measuring whether a developer has sufficient inclusiveness and technical capabilities.

Some developers didn't notice this, and they submitted open source projects with good intentions, and the configuration files were also submitted. The person who downloaded the source code changed the database indiscriminately, resulting in heavy losses.

When we encounter sensitive information files configured by the project, we don't need to submit them. Idea provides the .ignore plugin, which is as follows:

Open the idea, click file, then click settings, select Plugins

Click Browse repositoriese

Search for .ignore, download and install, after the installation is complete, you need to restart the idea

Select .gitignore file

Click generate to generate the template

For example, I don't want to submit the application-dev.properties file, (because there is sensitive information, database configuration, Alibaba Cloud accessKey, etc.)

 

Then click on the .gitignore file and find that it has been added.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325066985&siteId=291194637
Recommended