Repository navigation
Add .gitignore for Spring project files - #4804
JitenRajpurohit wants to merge 3 commits into
Conversation
JitenRajpurohit
left a comment
There was a problem hiding this comment.
Spring.gitignore is cleaned and production safe. It is slightly over-inclusive, not wrong.
|
This PR is stale because there have been no updates in 90 days. It will close after 365 days of inactivity. Leave a comment if you want to keep it open. |
dooleydevin
left a comment
There was a problem hiding this comment.
| # OS | ||
| .DS_Store | ||
| Thumbs.db | ||
| desktop.ini | ||
|
|
There was a problem hiding this comment.
We intentionally don't include OS-specific ignores in our templates, reserving them for their own Global templates like: https://github.com/github/gitignore/blob/main/Global/macOS.gitignore
| # OS | |
| .DS_Store | |
| Thumbs.db | |
| desktop.ini |
| # IDEs | ||
| .idea/ | ||
| *.iml | ||
| out/ | ||
| .vscode/ |
There was a problem hiding this comment.
Similar to the OS-specific changes, we reserve IDE rules for their own Global templates like https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
| # IDEs | |
| .idea/ | |
| *.iml | |
| out/ | |
| .vscode/ |
| # Eclipse | ||
| .classpath | ||
| .project | ||
| .settings/ | ||
|
|
There was a problem hiding this comment.
I'd ask that we also remove the eclipse section in favor of the Global template: https://github.com/github/gitignore/blob/main/Global/Eclipse.gitignore
| # Eclipse | |
| .classpath | |
| .project | |
| .settings/ |
| @@ -0,0 +1,76 @@ | |||
| # Compiled class file | |||
There was a problem hiding this comment.
I'd ask that we move this under community/Java here: https://github.com/github/gitignore/tree/main/community/Java
Reasons for making this change
Currently, the
Java.gitignoreprovided in this repository focuses on core language artifacts but misses several critical files generated by the Spring Boot ecosystem and its integration with modern build tools (Maven/Gradle).This new
Spring.gitignoretemplate provides:target/,build/)..sts4-cache,.springBeans, and local configuration files (.env,*.properties.local) that often contain sensitive secrets.Adding this as a standalone template allows developers to
git initSpring projects with a "batteries-included" ignore file that prevents accidental commits of binary dependencies and local secrets.Links to documentation supporting these rule changes
target/andbuild/must be ignored)..gitignoreby default; this PR aligns with the community standard set by the Spring team.