What doesn't need to be committed to version control in a Godot project?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By shianiawhite

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!

:bust_in_silhouette: Reply From: eons

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.

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

Bartosz | 2018-03-20 10:30

Sorry, yes, entries for .gitignore

Here is an example

eons | 2018-03-21 10:09

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!

shianiawhite | 2018-03-21 17:42

.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.

KoBeWi | 2018-03-25 14:56

.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.

eons | 2018-03-25 20:49