+2 votes

What files can I add to my gitignore for my project? When you add an image, it creates the IMAGE_NAME.png.import file as well. Along with a .import/IMAGE_NAME.png-LONGSTRING.stex. Should I always commit these as well? Or would they be properly autogenerated on another machine if the project is imported without them? Are there other types of files I don't need to commit with the project generated by the engine? Thank you!

in Engine by (107 points)

1 Answer

+3 votes
Best answer

The.import directory, export_presets.cfg too probably , if you are using custom templates.
Also all the folders created by your code editors (like .vscode), gdnative binaries, thumbnail files created by file browsers.

Not sure if I am missing something.

by (7,874 points)
selected by

could you clarify in your answer if you're talking about committing mentioned files or adding them to .gitignore, because now it is unclear

Sorry, yes, entries for .gitignore

Here is an example
https://github.com/godotengine/godot-demo-projects/blob/3.0-d69cc10/.gitignore

Just to clarify, you said the .import directory doesn't need to be committed, but you didn't include the IMAGE_NAME.png.import when it is not in the .import directory. Does that mean that the .import extension files outside the .import directory should be committed, even though you should exclude the .import directory? (I noticed the .import extension file points to the file in the .import directory.) Also, do you happen to have a brief reasoning you can give as to why these files are ones you can not commit (e.g. "these are files that are autogenerated by Godot based on the file they're based on, so they will always be autogenerated the same way"). And I only need clarification for the Godot specific files (I can find elsewhere the reasoning for files generated by a separate code editor, etc). Thank you much!

.import files are auto-generated, but they can be customized. E.g. when you import a texture, you might want to disable filtering. This change is reflected in corresponding .import file, which might be auto-generated differently based on your default settings. So do commit .import files, but don't commit the .importdirectory.

.import directory is full of (binary) files that will change on every reimport and every time a new user loads the project, these are big and useless for VCS.

*.import files have the import flags used by the editor, needed to keep settings (like image filters, 3D scenes importing type, looping sounds, etc.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.