Closed matthiashermsen closed 4 years ago
Update: So I know that I can combine a .gitignore file with this useful tool
The current tags I'm using are
Csharp, Unity, Visual Studio, Visual Studio Code, Rider
but as mentioned above I know some the files generated by Entitas should get ignored too. E.g. the userproperties
file. Are there any information out there which files to add to the ignore list?
@sschmid I think this might be useful for other ones too so after closing this issue I could contribute a small wiki page e.g. "Version Control" if you don't mind :)
but as mentioned above I know some the files generated by Entitas should get ignored too. E.g. the userproperties file. Are there any information out there which files to add to the ignore list?
The tags you cited are good. You might also benefit from adding the following (although some might be more useful in your global .gitignore
):
Archive
Backup
Compression
CompressedArchive
DotnetCore
Git
These tags may be useful depending on which other software you're using, and on which OS;
Adobe
(but if you're directly importing PSDs then remove the *.psd
rule)GPG
JetBrains
Linux
macOS
SSH
Windows
These tags will be useful depending on the platforms you're targeting:
Android
AndroidStudio
Web
Xcode
Xcodeinjection
None of the above tags are specific to Entitas, but they're good to use anyway.
If you need more later, you can always add more patterns. Here are some of mine that aren't specific to my project's needs:
!.github/**
(if you use GitHub Actions, don't accidentally exclude your workflows)Sirenix.Serialization.AOTGenerated.dll
and Sirenix.Serialization.AOTGenerated.dll.meta
if you use Odin (as these are auto-generated DLLs to ensure that certain classes aren't stripped)PerformanceTestRunInfo.json
and PerformanceTestRunInfo.json.meta
, as you don't need this at runtimeSome other tips:
I created that one and we use it for our games gitignore.txt
I add files to ignore as I go.
I remember when I started with Unity, it wasn't very clear to me, which file are necessary and which once can be ignored. I think the most important part is to learn which programs (like Unity, VS, Rider, etc) generate which files and which ones are actually needed. My rule of thumb is that everything that can be regenerated, is temporary (like build folders) or is user specific (like layouts) should be ignored in order to keep the repo as small as possible and avoid git changes each time someone else opens the project. I stage and commit files selectively, so I can easily spot new files and folders and can do a quick research if they are needed. Usually you can always ignore everything your IDE generates (like .vs, .vscode,. idea). For Unity, definitely ignore the Library folder, as it can be regenerated from scratch by Unity. New libraries, sdks or assets from the asset store might introduce new file that can be ignored. That means, your gitignore might be different to anyone elses and the other way around. I actually like to have pretty empty one to begin with and add things specific to that project as I go.
Hm yeah, I gathered everything from your suggestions, might be a little overkill :P
Yes, definitely overkill :D
I'd be worried that my actual source code will be ignored with a file that big :D I'm not sure what kind of project you're working on, but if it's a normal Unity project, I guess 90% of that can be removed. I prefer that my files only contain things that are actually needed and that every line has intent. If they don't have intent it's just noise. This gitignore communicates to me that it's the most complex project I've ever seen. If this is not the case, then remove the complexity.
Also, empty lines like this that don't do anything tells me that this file is not maintained and maybe really old.
# Tabs Studio
# Telerik's JustMock configuration file
# BizTalk build output
# OpenCover UI analysis results
# Azure Stream Analytics local run output
# MSBuild Binary and Structured Log
# NVidia Nsight GPU debugger configuration file
# MFractors (Xamarin productivity tool) working folder
# Local History for Visual Studio
# BeatPulse healthcheck temp database
# Backup folder for Package Reference Convert tool in Visual Studio 2017
# Ionide (cross platform F# VS Code tools) working folder
It's just a gitignore, keep it simple :)
As I mentioned previously, personally I add things as I go. If you doublecheck before you commit you can always add things to your gitignore if sth is missing. It's a process, you don't have to be prepared for every case that exists in advance. You can update and modify this file as the complexity of the project increases.
yes, I will do :)
But do you think people should deal with the .gitignore on their own or would you like it to have a "Version Control" section in the wiki?
Hi, is there a ready to use .gitignore file for Unity projects using Entitas and multiple IDEs like VS, Rider, VSC, ...? Basically I'm always starting with Github's Unity .gitignore template but many things are missing e.g.
userproperties
.Maybe one is willing to share his .gitignore file covering everything I could imagine :)
Thanks in advance!