toptal / gitignore.io

Create useful .gitignore files for your project
https://www.toptal.com/developers/gitignore
MIT License
8.21k stars 623 forks source link

Proposal: Sort '!' to the bottom of the gitignore file, so inclusions are more important than exclusions #626

Open constant-flow opened 11 months ago

constant-flow commented 11 months ago

Issue

The unity and visual studio templates conflict with each other in the sense that unity relies heavily on *.meta files when versioned and VS is excluding these files. Both solutions are used alongside very often, so they should be matched to work together.

You say now: This sounds like a template issue, you are right, but I'd propose an improvement to this tool.

For example: This tool could check if the one is having a !*.meta where the other is having a *.meta (unfortunately unity's template doesn't use this notation yet)

Expected Behavior:

Either

so for example, this whole section should go to the end of the generated gitignore file

# Unity3D generated meta files (include & exclude)
!*.meta
*.pidb.meta
*.pdb.meta
*.mdb.meta

Actual Behavior:

Reproduction Steps: