Comments (6)
Hi there,
sry for opening up this issue again but I think the decisions on .project and .classpath need to be reevaluated. I do develop Java projects with Eclipse for a living and I never had a case where it was required or even useful to keep those two files in the code repository.
The idea for any IDE is like this:
- git clone the repo
- Build it
- Import it into your favorite IDE
The IDE's importer is supposed to create reasonable defaults. In my experience the chance for error increases if new developers check those files out and then try to import the project rather than letting the IDE's importer do the work.
It seems that over the years, .classpath was removed from the template. Thus, the Eclipse template now has .project commented out and no entry for .classpath.
Also the .classpath is regenerated on each project Maven update in the Eclipse IDE, so it really does not seem to be reasonable to keep them.
I'd advocate for including both of those files per default into the Eclipse template. Any thoughts on this?
from gitignore.io.
It is supposed to be like that. If you look at the master gitignore repo Eclipse.gitignore template hosted by GitHub, you'll find that the eclipse file doesn't ignore those two files.
The reasons for keeping them are outlined in this Stack Overflow post
from gitignore.io.
Please revisit this topic for a moment with me. Or I could open a new issue if you wish. I think there is a strong case to be made for git not tracking .project and .classpath and putting these in the .gitignore.
I recently performed large conversion for an organization's VCS from CVS to Git and at the same time I converted all of their webapps to multi-module Maven projects. I initially tried to have Git track these two files based on gitignore.io and the StackOverflow post you mentioned. But I ended up removing these from git tracking and adding them to the .gitignore file.
The reason is because Eclipse sometimes rewrites these files like during a Maven update based on the project pom.xml. I had instances where two separate developers did a maven update and contents of these files would be slightly different between their two systems and they would be constantly overwriting each other's .project and .classpath files.
Really there is no need for the .project and .classpath files to have been committed to git in the first place since Maven handles these.
So when it comes to Eclipse and if you use Maven, I'm advocating for at least a comment message in gitignore.io generator for Eclipse that would say something like "If using Maven, you may want to ignore these files." And then list the files commented out by default like you've done for some of the other tools.
# If using Maven with Eclipse, then you may want to ignore these files:
#.project
#.classpath
Please reference these posts as additional arguments if favor of ignoring .classpath and .project files
from gitignore.io.
There is already an issue to create a .patch [#36] file format so that we can augment the master git repository by adding/removing certain lines. I just haven't gotten around to adding it yet and no one has submitted a PR. Once the .patch files are in place, we will be able to fix this.
from gitignore.io.
Added .patch
format so the .project
and .classpath
are now appended to the Eclipse .gitignore template file.
from gitignore.io.
Cheers!
from gitignore.io.
Related Issues (20)
- The process cannot access the file 'D:\Code\Multi-Scene Defense System For Fake News Counter Sample\classfication_attaction\test\.gitignore' because it is being used by another process. HOT 2
- Weird character at the end of the generated ignore with CLI HOT 5
- Website does not function when Ad Block is enabled HOT 19
- Not works on Firefox browser HOT 18
- .gitignore
- Problem HOT 3
- BUG HOT 5
- Critical: Visual basic template makes git ignore all subdirectories. HOT 1
- Cache the api response into a file, to accelerate the completion.
- Add `.gitignore` as suffix to URL (feature request) HOT 3
- fabrikaautocare HOT 1
- Same rules : WebStorm+iml & RubyMine+iml HOT 1
- Never ignore *.meta files for Unity projects HOT 1
- zsh installation instructions wrong HOT 8
- Feature Request: CLI tool that talks with GitHub directly HOT 2
- .NET-related templates should now include .artifacts HOT 3
- Proposal: Sort '!' to the bottom of the gitignore file, so inclusions are more important than exclusions
- CLI, cannot access .gitignore file because it is being used by another process.
- IntelliJ-rule "out/" cause all folders out to be excluded
- echo "function gi() { curl -sL https://www.toptal.com/developers/gitignore/api/\$@ ;}" >> \ ~/.bashrc && source ~/.bashrc HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitignore.io.