-
Star
(456)
You must be signed in to star a gist -
Fork
(128)
You must be signed in to fork a gist
-
-
Save nemotoo/b8a1c3a0f1225bb9231979f389fd4f3f to your computer and use it in GitHub Desktop.
## Unity ## | |
*.cs diff=csharp text | |
*.cginc text | |
*.shader text | |
*.mat merge=unityyamlmerge eol=lf | |
*.anim merge=unityyamlmerge eol=lf | |
*.unity merge=unityyamlmerge eol=lf | |
*.prefab merge=unityyamlmerge eol=lf | |
*.physicsMaterial2D merge=unityyamlmerge eol=lf | |
*.physicMaterial merge=unityyamlmerge eol=lf | |
*.asset merge=unityyamlmerge eol=lf | |
*.meta merge=unityyamlmerge eol=lf | |
*.controller merge=unityyamlmerge eol=lf | |
## git-lfs ## | |
#Image | |
*.jpg filter=lfs diff=lfs merge=lfs -text | |
*.jpeg filter=lfs diff=lfs merge=lfs -text | |
*.png filter=lfs diff=lfs merge=lfs -text | |
*.gif filter=lfs diff=lfs merge=lfs -text | |
*.psd filter=lfs diff=lfs merge=lfs -text | |
*.ai filter=lfs diff=lfs merge=lfs -text | |
#Audio | |
*.mp3 filter=lfs diff=lfs merge=lfs -text | |
*.wav filter=lfs diff=lfs merge=lfs -text | |
*.ogg filter=lfs diff=lfs merge=lfs -text | |
#Video | |
*.mp4 filter=lfs diff=lfs merge=lfs -text | |
*.mov filter=lfs diff=lfs merge=lfs -text | |
#3D Object | |
*.FBX filter=lfs diff=lfs merge=lfs -text | |
*.fbx filter=lfs diff=lfs merge=lfs -text | |
*.blend filter=lfs diff=lfs merge=lfs -text | |
*.obj filter=lfs diff=lfs merge=lfs -text | |
#ETC | |
*.a filter=lfs diff=lfs merge=lfs -text | |
*.exr filter=lfs diff=lfs merge=lfs -text | |
*.tga filter=lfs diff=lfs merge=lfs -text | |
*.pdf filter=lfs diff=lfs merge=lfs -text | |
*.zip filter=lfs diff=lfs merge=lfs -text | |
*.dll filter=lfs diff=lfs merge=lfs -text | |
*.unitypackage filter=lfs diff=lfs merge=lfs -text | |
*.aif filter=lfs diff=lfs merge=lfs -text | |
*.ttf filter=lfs diff=lfs merge=lfs -text | |
*.rns filter=lfs diff=lfs merge=lfs -text | |
*.reason filter=lfs diff=lfs merge=lfs -text | |
*.lxo filter=lfs diff=lfs merge=lfs -text | |
I wrote a post about that .gitattributes
and other Unity with git stuff here:
https://franknine.github.io/posts/unity-git-en/#gitattributes
@FrankNine Add in the NavMeshData to your list of binary .asset. Good job!
Leave .asset alone. This setup as is will destroy Terrains for sure, and likely others.
Leave .asset alone. This setup as is will destroy Terrains for sure, and likely others.
If you add rules before the generic .asset that treats it as text, you'll be fine. But you need proper rules and in some cases naming conventions. If you follow that you won't have a problem. If you read my previous response, there is a git tool that allows you to test the gitattribute rules based on a filename in the project, so you can verify your rules work.
I wrote a post about that
.gitattributes
and other Unity with git stuff here: https://franknine.github.io/posts/unity-git-en/#gitattributes
Not entirely sure I understand this one. I tried it on a new project and it basically turned EVERYTHING into LFS files. c# files, gitignore, csv files, hell even .txt files became LFS pointers. So really confused. I thought I'd goofed up the setup the first time, but same results on the second try.
I 100% agree this gist is flawed, as I stated oh boy 6 years ago? But yours seems to swing too far in the other direction unless I'm missing something.
EDIT: You know what? This is not true. I'm a lying SOB. I went back to your file again and somehow I must have gotten a corrupted copy or well I don't know what. But when I compared what I had downloaded to what was actually in your file, there were a TON of entries directly after the SQLite entry that was essentially forcing everything to be LFS and I have no idea where it came from. But it clearly isn't in your file, so.. round 3!
Hello. This gitattributes was created when we were using Unity previously.
Unfortunately, since we no longer use Unity, we don’t know if this gitattributes file is properly configured for the current version of Unity.
We considered closing this GIST, but we think it would be more helpful to provide a link to a properly updated gitattributes file instead.
Please let me know if there’s a resource that reflects the latest Unity version. We’ll link to that instead.
The repository at "https://github.com/FrankNine/RepoConfig" seems to track recent Unity versions. If there are no issues, it’ll proceed with this one.
I wrote a post about that
.gitattributes
and other Unity with git stuff here: https://franknine.github.io/posts/unity-git-en/#gitattributesNot entirely sure I understand this one. I tried it on a new project and it basically turned EVERYTHING into LFS files. c# files, gitignore, csv files, hell even .txt files became LFS pointers. So really confused. I thought I'd goofed up the setup the first time, but same results on the second try.
I 100% agree this gist is flawed, as I stated oh boy 6 years ago? But yours seems to swing too far in the other direction unless I'm missing something.
EDIT: You know what? This is not true. I'm a lying SOB. I went back to your file again and somehow I must have gotten a corrupted copy or well I don't know what. But when I compared what I had downloaded to what was actually in your file, there were a TON of entries directly after the SQLite entry that was essentially forcing everything to be LFS and I have no idea where it came from. But it clearly isn't in your file, so.. round 3!
Just a quick reply before this gets closed. This is why I mention git check-attr
. Make a dummy repo, add all kinds of files in it, and provide the gitattributes you want, commit them all locally (it's dummy we don't care, it's only local) and then just start looking into the attributes of files you want to check. If you learn how to read the git check-attr
output, which is not that hard, you'll be able to debug such situations. It's such a handy tool, but not advertised enough, especially for such a known annoying thing. e.g. for .asset files, you just check the attributes and you can surmise which rule got matched and then figure out why.
I found a good reference #https://github.com/FrankNine/RepoConfig/blob/1a4b0ca56e21595b2f7a155709bafcad7083db7e/.gitattributes