Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.gitignore written by the editor's Version Control Metadata functionality is incomplete #93026

Open
mubinulhaque opened this issue Jun 11, 2024 · 2 comments

Comments

@mubinulhaque
Copy link

mubinulhaque commented Jun 11, 2024

Tested versions

  • Reproducible in v4.2.2

System information

Windows 10.0.19045 - Vulkan (Mobile) - dedicated NVIDIA GeForce GTX 1650 SUPER (NVIDIA; 31.0.15.5152) - Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 Threads)

Issue description

.gitignore doesn't include the same number of files that the official gitignore repository has. For comparison, creating a project with Version Control Metadata set to Git will contain the following .gitignore:

# Godot 4+ specific ignores
godot/

Meanwhile, the official Godot .gitignore found here is:

# Godot 4+ specific ignores
.godot/
 
# Godot-specific ignores
.import/
export.cfg
export_presets.cfg

# Imported translations (automatically generated from CSV files)
*.translation

# Mono-specific ignores
.mono/
data_*/
mono_crash.*.json

Note that the above quote is strangely formatted due to GitHub. Please click the link above to see what it should actually look like.

The official one should be the one created with Godot.

Steps to reproduce

  1. Create a new project with the Godot Project Manager
  2. Set Version Control Metadata to Git

Minimal reproduction project (MRP)

Not necessary. Any project created with version control metadata set to Git will contain the incomplete .gitignore file.

@akien-mga
Copy link
Member

https://github.com/github/gitignore/blob/main/Godot.gitignore covers Godot 2, Godot 3 and Godot 4, while the .gitignore file generated by Godot 4 for a Godot 4 project doesn't need to keep listing Godot 3 specific files.

export_presets.cfg is up for debate - it used to be ignored in Godot 3 due to include things like Android export credentials, but that's no longer a problem in Godot 4, so the file doesn't need to be ignored (not having it in Git means you can't export the project from CI).

*.translation files IMO shouldn't be ignored, but that's something worthy of more investigation.

@Calinou
Copy link
Member

Calinou commented Jun 13, 2024

*.translation files IMO shouldn't be ignored, but that's something worthy of more investigation.

These files are binary files generated from the source CSV files, so there shouldn't be any reason to commit them to version control. gettext PO files also have binary MO counterparts, but these need to be committed to version control as these files must be manually generated by the user.

To be fair, *.translation files should probably be written to .godot/ and the TranslationServer's list of translations should refer to the source CSV files instead of directly referring to the imported files.

@Calinou Calinou changed the title .gitignore is incomplete .gitignore written by the editor's Version Control Metadata functionality is incomplete Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants