Save to .gitattributes
in the root directory of a Unity project. See Using Git for Unity Projects for additional details.
.gitattributes [attr]unityyaml -text merge=unityyamlmerge diff
[attr]lfs -text filter=lfs diff=lfs merge=lfs
* text=auto
*.cs text diff=csharp
*.meta unityyaml *.unity unityyaml *.asset unityyaml *.prefab unityyaml *.mat unityyaml *.anim unityyaml *.controller unityyaml *.overrideController unityyaml *.physicMaterial unityyaml *.physicsMaterial2D unityyaml *.playable unityyaml *.mask unityyaml *.brush unityyaml *.flare unityyaml *.fontsettings unityyaml *.guiskin unityyaml *.giparams unityyaml *.renderTexture unityyaml *.spriteatlas unityyaml *.terrainlayer unityyaml *.mixer unityyaml *.shadervariants unityyaml *.preset unityyaml *.asmdef -text diff
*.cubemap lfs *.unitypackage lfs
*-[Tt]errain.asset -unityyaml lfs
*-[Nn]av[Mm]esh.asset -unityyaml lfs
*.jpg lfs *.jpeg lfs *.png lfs *.apng lfs *.atsc lfs *.gif lfs *.bmp lfs *.exr lfs *.tga lfs *.tiff lfs *.tif lfs *.iff lfs *.pict lfs *.dds lfs *.xcf lfs *.leo lfs *.kra lfs *.kpp lfs *.clip lfs *.webm lfs *.webp lfs *.svg lfs *.svgz lfs *.psd lfs *.afphoto lfs *.afdesign lfs
*.mp3 lfs *.ogg lfs *.wav lfs *.aiff lfs *.aif lfs *.mod lfs *.it lfs *.s3m lfs *.xm lfs
*.mov lfs *.avi lfs *.asf lfs *.mpg lfs *.mpeg lfs *.mp4 lfs *.flv lfs *.ogv lfs *.wmv lfs
*.fbx lfs *.obj lfs *.max lfs *.blend lfs *.blender lfs *.dae lfs *.mb lfs *.ma lfs *.3ds lfs *.dfx lfs *.c4d lfs *.lwo lfs *.lwo2 lfs *.abc lfs *.3dm lfs *.bin lfs *.glb lfs
*.exe lfs *.dll lfs *.so lfs *.pdb lfs *.mdb lfs
*.zip lfs *.7z lfs *.gz lfs *.rar lfs *.tar lfs
|
Note: When making changes to .gitattributes
, files must be un-staged and re-staged for changes to be applied:
git reset HEAD -- git add -A
|
Changes can then be verified using:
git lfs status | grep LFS:
|