Skip to content

Instantly share code, notes, and snippets.

@Srfigie
Forked from nemotoo/.gitattributes
Created February 2, 2020 14:30
Show Gist options
  • Save Srfigie/77b5c15bc5eb61733a74d34d10b3ed87 to your computer and use it in GitHub Desktop.
Save Srfigie/77b5c15bc5eb61733a74d34d10b3ed87 to your computer and use it in GitHub Desktop.
.gitattributes for Unity3D with git-lfs
## 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
*.tif 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
@Romanlsaev
Copy link

Romanlsaev commented Apr 24, 2023

hey, will be cool if you also add a tgz files into git lfs
just place this in 47 line: *.tga filter=lfs diff=lfs merge=lfs -text
and thanks to you!)

@restush
Copy link

restush commented Jun 17, 2023

how about blender backup file? *.blend1

@KyleSaki714
Copy link

Thanks man!!

@Jalynnn
Copy link

Jalynnn commented Jul 28, 2023

should include the following for unity projects as well
*.dylib filter=lfs diff=lfs merge=lfs -text

@jaycekey
Copy link

jaycekey commented Nov 1, 2023

Thank u man! <3

@lucutes
Copy link

lucutes commented Dec 30, 2023

meow

@KraftRicardo
Copy link

Thanks a lot!

@gleblebedev
Copy link

Sometimes
*.asset merge=unityyamlmerge eol=lf
could be binary and this like with break such assets

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