Skip to content

Instantly share code, notes, and snippets.

@thebeardphantom
Last active April 9, 2017 13:08
Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save thebeardphantom/982bab3b026571ab7970 to your computer and use it in GitHub Desktop.
Save thebeardphantom/982bab3b026571ab7970 to your computer and use it in GitHub Desktop.
Unity GitIgnore
# Ignore everything
/*
/*/
# Inverse ignore some stuff
!/Assets/
!/ProjectSettings/
!.gitignore
# OS Stuff
.DS_Store
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
$RECYCLE.BIN/
Desktop.ini
@thebeardphantom
Copy link
Author

A simpler gitignore that ignores EVERYTHING in the project and then afterwards un-ignores the stuff we care about.

@prodigga
Copy link

I use this for pretty much every project now, thanks

@thebeardphantom
Copy link
Author

No problem!

@sbseltzer
Copy link

This is the most sensible solution I've seen so far.
Question: Why have the OS stuff if you've already excluded it?

@emlowry
Copy link

emlowry commented Sep 3, 2015

@GeekWithALife: I'm guessing it's so those OS-generated files will be still be ignored inside the inverse-ignored Assets and ProjectSettings folders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment