Godot best practices for git

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

Hello,

I’m using git already for my project to collaborate with a friend.
Generally it’s very straight forward to work with it but for a couple of exceptions I didn’t find any answers. Therefore I’d like to know if anybody know a good source which describes the best way to configure git for your godot project?

I’ve had some problems with following files:
project.godot: Could it be that ‘AutoLoad’ modifications do need a manual interaction by the user to make them be part of the project. I’m able to see this part in the config file but made the experience that I’ve had to manually configure that by GUI before to make that work.

Does this file store any information which is depended to the users system?

Since no sensitive information is stored in those config files I’d like to

level.tscn: Level modifications are done by GUI and the file is generated automatically. This aren’t the best characteristics for a versioning. This leads to massive merge conflicts and manual resolvings which disturb the working flow. Does anyone has good answers how to enable level design with git?

Thanks and regards

:bust_in_silhouette: Reply From: Lopy

Searched through the project.godot and it seemed like it did not contain any username or absolute path, so it should be alright to include it.

In general, to avoid merging, you want to not work on the same file as someone else at the same time. The nice thing with Scenes is that they can contain many other, so the answer to .tscn merging is “smaller” .tscns. That way, you can work on enemy.tscn while your friend works on mansion.tscn. This does require to agree on a general scene layout first, and to give each .tscn an “owner” who can edit it without asking.