toptal / gitignore.io

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

Never ignore *.meta files for Unity projects #607

Closed janezk7 closed 1 year ago

janezk7 commented 1 year ago

Expected behaviour:

.gitignore should never ignore *.meta files in Unity projects

Actual behaviour:

.gitignore for VisualStudio ignores .meta files, while .gitignore for Unity don't explicitly negate ignores for its .meta files which should never be ignored. This causes broken Unity assets when cloning the repository.

Reproduction steps:

Selecting "VisualStudio" and "Unity" to generate .gitignore file

Possible solution:

Adding !/[Aa]ssets/*/.meta to the end of the .gitignore file.

macap commented 1 year ago

Duplicates #522, but i like the idea of the negated pattern.

Nevertheless Unity.gitignore comes from https://github.com/github/gitignore/blob/main/Unity.gitignore and i believe it should be updated there.