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

Enhancement suggestion: distinguishing environment- and project-specific gitignore #446

Open
TonalidadeHidrica opened this issue Feb 24, 2019 · 6 comments

Comments

@TonalidadeHidrica
Copy link

My idea is about enhancement of the gitignore.io website: highlighting environment-specific items in the search box.

It is widely known that it is bad habit to add OS-specific / editor-specific / IDE-specific gitignore list into each project's .gitignore. Instead, one should add them into global .gitignore in their local machine. This is already pointed out in some issues, e.g. #4 , #38 . And in documentation it is already (implicitly) recommended to add Operating System and IDE settings to global .gitignore.
However, since I have used the web interface only for a long time and didn't know it was not preferable; I just obediently followed to the message "Search Operating Systems, IDEs, or programming languages" and copy & pasted all the stuff into .gitignore in my each project.
So my opinion is that it would be helpful (especially for beginners!) if the web interface highlighted Windows, Vim or Eclipse with yellow background when they were entered into the search box, and show humble warning message below. Is it difficult to do that?
I'm sorry if this sort of issue was already posted.

@joeblau
Copy link
Collaborator

joeblau commented Feb 24, 2019

Great suggestion. I do have a few questions about how users would know what the yellow background would actually mean. Also it's the web so anything is possible — Right now I'm using the Select2 select box framework so if this functionality is available there, I could apply it to the gitignore.io.

@TonalidadeHidrica
Copy link
Author

TonalidadeHidrica commented Feb 25, 2019

My general idea is something like the following. Here, I didn't edit the source code but just edited DOM with the dev tools.
I took casual glance at the documentation of Select2 and couldn't find the way to set the color for each item. Instead, adding an event listener for the change and adding some highlight class to the li element will probably do, although I'm not sure it's the best way.
image

@joeblau
Copy link
Collaborator

joeblau commented Feb 26, 2019

Have you thought about his this may also apply to the command line?

@TonalidadeHidrica
Copy link
Author

I didn't think of it but that sounds also useful.
Maybe showing message to stderr or something?

@ChaerilM
Copy link

ChaerilM commented Jan 11, 2022

got a company repo filled with .nano_history, .bash_history, etc.
this idea would be a nice thing to have

@github-actions
Copy link
Contributor

This issue is stale because it has been open for 30 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants