Skip to main content

.gitattributes

Created on Mon May 24 2021Last updated on Thu Oct 27 2022
#
# Git attributes for Unity projects
#
# Compiled by the GameCI community - https://game.ci
#
# Latest version at https://gist.github.com/webbertakken/ff250a0d5e59a8aae961c2e509c07fbc
#

# Ensure that text files that any contributor introduces to the repository have their line endings normalized
* text=auto

# Increase probability of success for merging files with specific extensions
*.cs diff=csharp

# Macro attribute: Files with Unity's yaml format
# linguist-generated means the file is ignored for the repository's language statistics and diffs are hidden by default.
[attr]unity-yaml-file -text -merge=unityyamlmerge linguist-generated

# Macro attribute: Files intended for LFS
[attr]lfs-file filter=lfs diff=lfs merge=lfs -text

# Unity files
*.asmdef unity-yaml-file -linguist-generated
*.anim unity-yaml-file
*.asset unity-yaml-file
*.brush unity-yaml-file
*.controller unity-yaml-file
*.flare unity-yaml-file
*.fontsettings unity-yaml-file
*.giparams unity-yaml-file
*.guiskin unity-yaml-file
*.mask unity-yaml-file
*.mat unity-yaml-file
*.meta unity-yaml-file
*.mixer unity-yaml-file
*.overrideController unity-yaml-file
*.physicMaterial unity-yaml-file
*.physicsMaterial2D unity-yaml-file
*.playable unity-yaml-file
*.prefab unity-yaml-file
*.preset unity-yaml-file
*.renderTexture unity-yaml-file
*.shadervariants unity-yaml-file
*.spriteatlas unity-yaml-file
*.terrainlayer unity-yaml-file
*.unity unity-yaml-file

# Unity binary files
*.bundle lfs-file
*.cubemap lfs-file
*.unitypackage lfs-file

# Unity specific assets
*-[Nn]av[Mm]esh.asset lfs-file
*-[Tt]errain.asset lfs-file
*OcclusionCullingData.asset

# Creative software
*.rns lfs-file
*.reason lfs-file
*.lxo lfs-file
*.exr lfs-file

# Documents
*.pdf lfs-file

# Image formats
*.afdesign lfs-file
*.afphoto lfs-file
*.ai lfs-file
*.bmp lfs-file
*.dds lfs-file
*.jpg lfs-file
*.gif lfs-file
*.iff lfs-file
*.pict lfs-file
*.png lfs-file
*.psd lfs-file
*.svg lfs-file
*.tga lfs-file
*.tiff lfs-file
*.webp lfs-file

# Audio formats
*.aif lfs-file
*.aiff lfs-file
*.it lfs-file
*.mod lfs-file
*.mp3 lfs-file
*.ogg lfs-file
*.s3m lfs-file
*.wav lfs-file
*.xm lfs-file

# Video formats
*.mov lfs-file
*.avi lfs-file
*.asf lfs-file
*.mpg lfs-file
*.mpeg lfs-file
*.mp4 lfs-file

# 3D formats
*.3ds lfs-file
*.3dm lfs-file
*.abc lfs-file
*.blend lfs-file
*.c4d lfs-file
*.dae lfs-file
*.dfx lfs-file
*.FBX lfs-file
*.fbx lfs-file
*.glf lfs-file
*.gltf lfs-file
*.lwo lfs-file
*.lwo2 lfs-file
*.lxo lfs-file
*.obj lfs-file
*.ma lfs-file
*.max lfs-file
*.mb lfs-file

# Font formats
*.ttf lfs-file
*.otf lfs-file

# Bundles and binaries
*.dll lfs-file
*.exe lfs-file
*.mdb lfs-file
*.pdb lfs-file
*.so lfs-file

# Packaging
*.zip lfs-file
*.7z lfs-file
*.gz lfs-file
*.rar lfs-file
*.tar lfs-file