Brian E. answered 08/25/19
Senior Full Stack JavaScript Developer (Node & React)
GitHub has predefined .gitignore files created for various technologies. Check out the one for unity: https://github.com/github/gitignore/blob/master/Unity.gitignore
Donna G.
asked 08/20/19What is the best way to access the GitIgnore file and what patterns should I use to ignore Unity build files?
Brian E. answered 08/25/19
Senior Full Stack JavaScript Developer (Node & React)
GitHub has predefined .gitignore files created for various technologies. Check out the one for unity: https://github.com/github/gitignore/blob/master/Unity.gitignore
Amanda O. answered 08/24/19
Computer Science teacher with industry experience
It looks like the way to add a .gitignore file in Github Desktop is to first create the file somewhere on your computer, then add it under 'Repository Settings'.
First, create a .gitignore file. I'd recommend creating the file in Notepad (Windows) or TextEdit in PlainText mode (Mac). The file name should be exactly .gitignore, not something.gitignore, or .gitignore.txt. There's a great Unity .gitignore template at https://github.com/github/gitignore/blob/master/Unity.gitignore. Save this file somewhere on your computer.
Assuming your Git repository sits at the root of the Unity project directory, you can use the template from that link exactly.
The next step depends on your GitHub Desktop version, but you should be able to do something like: click 'Repository', click 'Repository Settings', click 'Ignored Files', and then upload your .gitignore file and save.
Template (same as GitHub link above):
Good luck!
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.
Donna G.
Thank you! Very helpful!08/27/19