-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: include Linux and JetBrains specific files in .gitignore #699
Conversation
Shouldn't these files be ignored by a personal global gitignore? |
hello @sigmike
I'm not familiar with global Having a configuration defined at the root of this repository allows us to not rely on the fact that maybe developers have took the time to define a personal configuration, and makes us sure that no unwanted file will be pushed by mistake. These options don't seem to be mutual exclusive, developers can still use personal |
Yes, each contributor has a different environment, and that implies a different set of files to ignore (each editor will have its own form of backup or temporary file, each OS may have different auto generated files, etc.). You can't handle all these contributor specific rules in the project, especially in an open source project. The ignore file would be unmaintainable. The project's Of course if many contributors use the same environment you could add them to the project's gitignore. But it's a favor to them and it doesn't encourage good practice.
Sure, but you won't handle all the cases. Have such files already been pushed in a PR? When that happens I think it would be better to suggest the contributor to setup a personal global gitignore. It's very easy to do (https://sebastiandedeyne.com/setting-up-a-global-gitignore-file/) and will help the contributors in the future because they won't have to add the same rules to all their projects, or change all their project's I guess if you often have contributions that include the same files then you could add them to the project's ignore file to avoid having to repeat the same suggestion over and over. But I would wait for that to happen.
Absolutely, it's like the 2 files are concatenated when git evaluates untracked files. |
Thank you for taking the time to answer : ) After reading you I'm now in favor of removing IDEs specific files from the I'm still in favor of keeping OSs specific files in the @sigmike what's your opinion on this proposition:
|
I'm not sure you can keep the gitignore small even if you only keep OS specific rules. The macOS one is pretty big already (and has a weird I think these rules pollute the project's gitignore, but many other projects also have such rules. And since tournesol only has sub projects in subdirectories there's no need for a project level ignore file, so it's not really polluted. I thought the global gitignore was more well known, so spreading awareness by mentioning it in the documentation is probably good. Or you can wait for the problem to happen (either people adding their rules to the ignore file or pushing unwanted files). |
I finally took the time to add more files to the
.gitignore
. Thegit diff
commands should be less talkative now, at last on my laptop.All sources come from the https://github.com/github/gitignore project.
Concerning JetBrains, as we don't plan for now to share configurations and as we use different IDEs I simply ignored all files specific to JetBrains IDEs.