Skip to content

Instantly share code, notes, and snippets.

@tnaseem
Last active September 15, 2023 17:09
Show Gist options
  • Save tnaseem/a8e7a7d91396bf043ebd05183907c121 to your computer and use it in GitHub Desktop.
Save tnaseem/a8e7a7d91396bf043ebd05183907c121 to your computer and use it in GitHub Desktop.
Unity .gitattributes for GitLFS
# Macro for all binary files that should use Git LFS.
[attr]uselfs filter=lfs diff=lfs merge=lfs
* text=auto
*.cs text eol=lf diff=csharp
*.cginc text eol=lf
*.shader text eol=lf
# Common files
*.unity text eol=lf -merge
*.prefab text eol=lf -merge
*.asset text eol=lf -merge
*.mat text eol=lf -merge
*.anim text eol=lf -merge
*.playable text eol=lf -merge
*.meta text eol=lf -merge
*.controller text eol=lf -merge
*.overrideController text eol=lf -merge
*.spriteatlas text eol=lf -merge
*.physicMaterial text eol=lf -merge
*.physicsMaterial2D text eol=lf -merge
*.mask text eol=lf -merge
*.brush text eol=lf -merge
*.flare text eol=lf -merge
*.fontsettings text eol=lf -merge
*.guiskin text eol=lf -merge
*.giparams text eol=lf -merge
*.renderTexture text eol=lf -merge
*.spriteatlas text eol=lf -merge
*.terrainlayer text eol=lf -merge
*.mixer text eol=lf -merge
*.shadervariants text eol=lf -merge
*.preset text eol=lf -merge
# Unity binary assets
*.unitypackage -text uselfs
*.cubemap -text uselfs
# Navmesh assets much have '-NavMesh' suffix.
# Terrain assets much have '-Terrain' suffix.
*-[Nn]av[Mm]esh.asset -text uselfs
*-[Tt]errain.asset -text uselfs
# Images
*.bmp -text uselfs
*.exr -text uselfs
*.gif -text uselfs
*.hdr -text uselfs
*.iff -text uselfs
*.jpeg -text uselfs
*.jpg -text uselfs
*.pict -text uselfs
*.png -text uselfs
*.psd -text uselfs
*.tga -text uselfs
*.tif -text uselfs
*.tiff -text uselfs
# 3D objects
*.3dm -text uselfs
*.3ds -text uselfs
*.blend -text uselfs
*.c4d -text uselfs
*.collada -text uselfs
*.dae -text uselfs
*.dxf -text uselfs
*.fbx -text uselfs
*.jas -text uselfs
*.lws -text uselfs
*.lxo -text uselfs
*.ma -text uselfs
*.max -text uselfs
*.mb -text uselfs
*.obj -text uselfs
*.ply -text uselfs
*.skp -text uselfs
*.stl -text uselfs
*.ztl -text uselfs
# Audio
*.aif -text uselfs
*.aiff -text uselfs
*.it -text uselfs
*.mod -text uselfs
*.mp3 -text uselfs
*.ogg -text uselfs
*.s3m -text uselfs
*.wav -text uselfs
*.xm -text uselfs
# Video
*.mp4 -text uselfs
*.m4v -text uselfs
*.mov -text uselfs
*.asf -text uselfs
*.avi -text uselfs
*.flv -text uselfs
*.mpeg -text uselfs
*.mpg -text uselfs
*.ogv -text uselfs
*.wmv -text uselfs
# Fonts
*.otf -text uselfs
*.ttf -text uselfs
# Documents
*.pdf -text uselfs
*.docx -text uselfs
# Compressed Archives
*.7z -text uselfs
*.bz2 -text uselfs
*.gz -text uselfs
*.rar -text uselfs
*.tar -text uselfs
*.zip -text uselfs
# Executables/Installers
*.apk -text uselfs
*.exe -text uselfs
# Build
*.dll -text uselfs
*.pdb -text uselfs
*.mdb -text uselfs
*.so -text uselfs
*.a -text uselfs
# Collapse Unity-generated files on GitHub
*.asset linguist-generated
*.mat linguist-generated
*.meta linguist-generated
*.prefab linguist-generated
*.unity linguist-generated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment