0 votes

We are using git (github) to collaborate between Windows, Mac, and Linux machines on the same project.

We are having issues with the editor saving files automatically and having most of the project show as dirty, converting CR to CRLF and vice versa. Meaning that for example: Godot Linux opens a file last edited on Windows, saves it by changing all the line endings, then git shows that and other files as modified.

I know this is a git question as much as a Godot question. But since the editor forces native line endings rather than having it be configurable, I have not figured out how to mitigate it. I have tried using a .gitattributes and *.tscn text but have not been successful:


There is an existing feature request issue to make this setting configurable, but has received little attention. I looked at it but my C++ is not nearly strong enough to make a contribution of this magnitude:


in Engine by (12 points)

Does it work better if you use *.tscn text eol=lf in .gitattributes? Godot (and most other software) can handle files with LF line endings just fine on Windows.

You may also want to disable automatic line ending conversion when cloning repositories using git config --global core.autocrlf input. This will only convert line endings from CRLF to LF (in case of mistakes) when committing files, not when cloning them.

Please log in or register to answer this question.

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 Frequently asked questions and 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.