Skip to content
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

add ide files to gitignore #4819

Closed

Conversation

Disservin
Copy link
Member

I think it would be great for any current/new dev's if we add some more IDE related paths to the gitignore.
Feel free to propose additions

No functional change

No functional change
@UniQP
Copy link
Contributor

UniQP commented Oct 5, 2023

I think IDE files should be ignored by the users themselves. There are many different IDEs and we would need to maintain the list of ignored IDE files in all repositories.

The proper way of ignoring IDE files (according to my knowledge) is to use git's core.excludesfile config to specify a user-specific ignore file that applies to all repositories. I would rather mention the existence of this git config somewhere than actually adding IDE-specific files to gitignore.

@Disservin
Copy link
Member Author

Mhh, good point, regarding the core.excludesfile.
Although when you have a look at a few of the most popular repositories on Github, they kinda all do this.
I agree that I wouldnt want to update the gitignore every few months because of a new ide, but some of the most popular ones might be helpful?

I had a look at:
https://github.com/vitejs/vite/blob/main/.gitignore
https://github.com/laravel/laravel/blob/10.x/.gitignore
https://github.com/vuejs/vue/blob/main/.gitignore
https://github.com/tensorflow/tensorflow/blob/master/.gitignore
https://github.com/electron/electron/blob/main/.gitignore
https://github.com/tauri-apps/tauri/blob/dev/.gitignore
https://github.com/facebook/react/blob/main/.gitignore

all of these pretty much at least add vscode/idea and .DS_STORE which is mac related.

@ddobbelaere
Copy link
Contributor

ddobbelaere commented Oct 5, 2023

Just adding to the suggestion of @UniQP, it's also possible to have other .gitignore files in the tree. E.g. a user might put a .gitignore inside the .vscode directory that ignores all files inside it. This is how e.g. mypy does it with their .mypy_cache directory and how some VSCode extensions that create build directories do it. This also keeps the working tree clean.

That being said, I'm not against this PR if it's only for the most popular IDEs.

.gitignore Outdated Show resolved Hide resolved
@Disservin
Copy link
Member Author

If the common consens is that the user should specify this then I have no problem with that and we can then close this.

@vondele
Copy link
Member

vondele commented Oct 7, 2023

I think developer/IDE specific files are probably better handled differently.

@Disservin Disservin closed this Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants