Last active
January 20, 2023 00:21
-
-
Save kleber-swf/6e62de2ed95cd2c0f2de to your computer and use it in GitHub Desktop.
Git ignore for Unity Projects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# =============== # | |
# Unity generated # | |
# =============== # | |
[Tt]emp/ | |
[Oo]bj/ | |
[Bb]uild | |
/[Ll]ibrary/ | |
/[Ll]ogs/ | |
sysinfo.txt | |
*.stackdump | |
# ============================================= # | |
# Visual Studio / MonoDevelop / Rider generated # | |
# ============================================= # | |
[Ee]xported[Oo]bj/ | |
.vs/ | |
/*.userprefs | |
/*.csproj | |
/*.pidb | |
/*.suo | |
/*.sln* | |
/*.user | |
/*.unityproj | |
/*.booproj | |
/.idea*/ | |
# ============ # | |
# OS generated # | |
# ============ # | |
.DS_Store* | |
._* | |
.Spotlight-V100 | |
.Trashes | |
ehthumbs.db | |
[Tt]humbs.db | |
[Dd]esktop.ini |
@kleber-swf is this supposed to ignore everything in the library folder ?
Still getting paths like (see bellow) being tracked in source tree
\UnityProject\Library\metadata\cb\cb62af8299528774697e1e79af2e473d
That's because you have your project inside a "UnityProject" folder. This .gitignore assumes you have all your project files in the root (where the .ignore itself lies). This is done by the /
at the beginning of the line /[Ll]ibrary
and it's there because you may have another Library folder in your project that you want to version control.
Basically you have two options to solve this problem:
- move .gitinore file to your "UnityProject"
- remove the
/
from the/[Ll]ibrary
line. Make sure you'll never have a "Library" folder inside your project thou
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry for that :/ This was for some OSX folders.
I removed the Icons/ rule and added Rider .idea* rule