unity: better gitignore (#1), and gitattributes

This commit is contained in:
Mark Joshwel 2024-07-09 12:04:56 +08:00
parent 0f7b54eb03
commit 6e51cf919a
2 changed files with 55 additions and 31 deletions

View file

@ -1,6 +1,6 @@
# sauel-tracking: https://github.com/gitattributes/gitattributes/blob/master/Unity.gitattributes # sauel-tracking: https://github.com/gitattributes/gitattributes/blob/master/Unity.gitattributes
# Unity source files # unity source files
*.cginc text *.cginc text
*.compute text linguist-language=hlsl *.compute text linguist-language=hlsl
*.cs text diff=csharp *.cs text diff=csharp
@ -8,7 +8,7 @@
*.raytrace text linguist-language=hlsl *.raytrace text linguist-language=hlsl
*.shader text *.shader text
# Unity JSON files # unity json files
*.asmdef eol=lf linguist-language=json *.asmdef eol=lf linguist-language=json
*.asmref eol=lf linguist-language=json *.asmref eol=lf linguist-language=json
*.index eol=lf linguist-language=json *.index eol=lf linguist-language=json
@ -16,12 +16,12 @@
*.shadergraph eol=lf linguist-language=json *.shadergraph eol=lf linguist-language=json
*.shadersubgraph eol=lf linguist-language=json *.shadersubgraph eol=lf linguist-language=json
# Unity UI Toolkit files # unity ui toolkit files
*.tss text diff=css linguist-language=css *.tss text diff=css linguist-language=css
*.uss text diff=css linguist-language=css *.uss text diff=css linguist-language=css
*.uxml text linguist-language=xml linguist-detectable *.uxml text linguist-language=xml linguist-detectable
# Unity YAML # unity yaml
*.anim merge=unityyamlmerge eol=lf linguist-language=yaml *.anim merge=unityyamlmerge eol=lf linguist-language=yaml
*.asset merge=unityyamlmerge eol=lf linguist-language=yaml *.asset merge=unityyamlmerge eol=lf linguist-language=yaml
*.brush merge=unityyamlmerge eol=lf linguist-language=yaml *.brush merge=unityyamlmerge eol=lf linguist-language=yaml
@ -52,17 +52,17 @@
*.physicMaterial merge=unityyamlmerge eol=lf linguist-language=yaml *.physicMaterial merge=unityyamlmerge eol=lf linguist-language=yaml
*.physicsMaterial2D merge=unityyamlmerge eol=lf linguist-language=yaml *.physicsMaterial2D merge=unityyamlmerge eol=lf linguist-language=yaml
# Exclude third-party plugins from GitHub stats # exclude third-party plugins from github stats
Assets/Plugins/** linguist-vendored Assets/Plugins/** linguist-vendored
# Unity LFS # unity lfs
*.cubemap filter=lfs diff=lfs merge=lfs -text *.cubemap filter=lfs diff=lfs merge=lfs -text
*.unitypackage filter=lfs diff=lfs merge=lfs -text *.unitypackage filter=lfs diff=lfs merge=lfs -text
# World Creator # world creator
*.wcr filter=lfs diff=lfs merge=lfs -text *.wcr filter=lfs diff=lfs merge=lfs -text
# 3D models # 3d models
*.3dm filter=lfs diff=lfs merge=lfs -text *.3dm filter=lfs diff=lfs merge=lfs -text
*.3ds filter=lfs diff=lfs merge=lfs -text *.3ds filter=lfs diff=lfs merge=lfs -text
*.blend filter=lfs diff=lfs merge=lfs -text *.blend filter=lfs diff=lfs merge=lfs -text
@ -84,7 +84,7 @@ Assets/Plugins/** linguist-vendored
*.stl filter=lfs diff=lfs merge=lfs -text *.stl filter=lfs diff=lfs merge=lfs -text
*.ztl filter=lfs diff=lfs merge=lfs -text *.ztl filter=lfs diff=lfs merge=lfs -text
# Audio # audio
*.aif filter=lfs diff=lfs merge=lfs -text *.aif filter=lfs diff=lfs merge=lfs -text
*.aiff filter=lfs diff=lfs merge=lfs -text *.aiff filter=lfs diff=lfs merge=lfs -text
*.it filter=lfs diff=lfs merge=lfs -text *.it filter=lfs diff=lfs merge=lfs -text
@ -95,7 +95,7 @@ Assets/Plugins/** linguist-vendored
*.wav filter=lfs diff=lfs merge=lfs -text *.wav filter=lfs diff=lfs merge=lfs -text
*.xm filter=lfs diff=lfs merge=lfs -text *.xm filter=lfs diff=lfs merge=lfs -text
# Video # video
*.asf filter=lfs diff=lfs merge=lfs -text *.asf filter=lfs diff=lfs merge=lfs -text
*.avi filter=lfs diff=lfs merge=lfs -text *.avi filter=lfs diff=lfs merge=lfs -text
*.flv filter=lfs diff=lfs merge=lfs -text *.flv filter=lfs diff=lfs merge=lfs -text
@ -106,7 +106,7 @@ Assets/Plugins/** linguist-vendored
*.ogv filter=lfs diff=lfs merge=lfs -text *.ogv filter=lfs diff=lfs merge=lfs -text
*.wmv filter=lfs diff=lfs merge=lfs -text *.wmv filter=lfs diff=lfs merge=lfs -text
# Images # images
*.bmp filter=lfs diff=lfs merge=lfs -text *.bmp filter=lfs diff=lfs merge=lfs -text
*.exr filter=lfs diff=lfs merge=lfs -text *.exr filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text *.gif filter=lfs diff=lfs merge=lfs -text

View file

@ -1,9 +1,6 @@
# sauel-tracking: https://github.com/github/gitignore/blob/main/Unity.gitignore # sauel-tracking: https://github.com/github/gitignore/blob/main/Unity.gitignore
# this .gitignore file should be placed at the root of your unity project directory
# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore
#
/[Ll]ibrary/ /[Ll]ibrary/
/[Tt]emp/ /[Tt]emp/
/[Oo]bj/ /[Oo]bj/
@ -12,26 +9,23 @@
/[Ll]ogs/ /[Ll]ogs/
/[Uu]ser[Ss]ettings/ /[Uu]ser[Ss]ettings/
# MemoryCaptures can get excessive in size. # memorycaptures can get excessive in size.
# They also could contain extremely sensitive data # they also could contain extremely sensitive data
/[Mm]emoryCaptures/ /[Mm]emoryCaptures/
# Recordings can get excessive in size # recordings can get excessive in size
/[Rr]ecordings/ /[Rr]ecordings/
# Uncomment this line if you wish to ignore the asset store tools plugin # autogenerated jetbrains rider plugin
# /[Aa]ssets/AssetStoreTools*
# Autogenerated Jetbrains Rider plugin
/[Aa]ssets/Plugins/Editor/JetBrains* /[Aa]ssets/Plugins/Editor/JetBrains*
# Visual Studio cache directory # visual studio cache directory
.vs/ .vs/
# Gradle cache directory # gradle cache directory
.gradle/ .gradle/
# Autogenerated VS/MD/Consulo solution and project files # autogenerated vs/md/consulo solution and project files
ExportedObj/ ExportedObj/
.consulo/ .consulo/
*.csproj *.csproj
@ -49,26 +43,56 @@ ExportedObj/
*.opendb *.opendb
*.VC.db *.VC.db
# Unity3D generated meta files # unity3d generated meta files
*.pidb.meta *.pidb.meta
*.pdb.meta *.pdb.meta
*.mdb.meta *.mdb.meta
# Unity3D generated file on crash reports # unity3d generated file on crash reports
sysinfo.txt sysinfo.txt
# Builds # builds
*.apk *.apk
*.aab *.aab
*.unitypackage *.unitypackage
*.app *.app
# Crashlytics generated file # crashlytics generated file
crashlytics-build.properties crashlytics-build.properties
# Packed Addressables # packed addressables
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
# Temporary auto-generated Android Assets # temporary auto-generated android assets
/[Aa]ssets/[Ss]treamingAssets/aa.meta /[Aa]ssets/[Ss]treamingAssets/aa.meta
/[Aa]ssets/[Ss]treamingAssets/aa/* /[Aa]ssets/[Ss]treamingAssets/aa/*
# idea stuff
.idea/**/gradle.xml
.idea/**/libraries
.idea/modules.xml
.idea/*.iml
.idea/modules
.idea/**/mongoSettings.xml
.idea/replstate.xml
.idea/caches/build_file_checksums.ser
**/.idea/httpRequests/
**/.idea/**/usage.statistics.xml
**/.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
.idea/*/.idea/projectSettingsUpdater.xml
.idea/*/.idea/encodings.xml
**/.idea/**/dataSources/
**/.idea/**/dataSources.ids
**/.idea/**/dataSources.xml
**/.idea/**/dataSources.local.xml
**/.idea/**/sqlDataSources.xml
**/.idea/**/dynamic.xml
**/.idea/**/uiDesigner.xml
**/.idea/**/dbnavigator.xml
**/.idea/**/*.iml
**/.idea/**/contentModel.xml
**/.idea/**/modules.xml