Godot: .gitignore for new projects

Created on 10 Apr 2019  路  9Comments  路  Source: godotengine/godot

Proposal: Allow the automatic addition of a .gitignore file when you create a new project. For example as a drop down option in the same menu where the initial renderer is chosen. Options could be: Default (GitHubs Godot .gitignore), None, and whatever custom ones you have installed. (Similar to script templates.)

Godot claims to be version control friendly, yet generates various files that should not be committed (like the .import folder.). This would make it easier to set up a clean environment, especially for newcomers to version control.

archived feature proposal editor

Most helpful comment

Not sure why Erik is being downvoted, but in game development studios solutions like Perforce or even SVN are a lot more common than Git, so it was definitely relevant.

If this is added, it should be a drop down list where you can select what kind of CVS you want to setup for, possibly with Git as default.

All 9 comments

I think automatically creating a .gitignore file with default contents makes sense, but I'm not sure if exposing a custom template system is worth the added complexity 鈥撀爌roject scaffolding tools may be more suited in this case.

Sounds like a good idea, it would definitely make things easier for the new users. On the other hand, implementing this would make an assumption that the end user is using git as their VCS which might not be the case.

New users are unlikely to use something other than git. And those that do, still need the ignore lists contents and implemented for their specific vcs. Generating the .gitignore could be a checkbox in the new project dialogue, or you simply delete the file if you don't need it.

Not sure why Erik is being downvoted, but in game development studios solutions like Perforce or even SVN are a lot more common than Git, so it was definitely relevant.

If this is added, it should be a drop down list where you can select what kind of CVS you want to setup for, possibly with Git as default.

@TheDuriel It's bad enough that new users are unlikely to use something other than Git. The least projects like Godot can do is make people aware that there are alternatives.
The reason new users are unlikely to use anything else than Git is not that it was the best tool for the average game developer. It's because people treat it as the default, because it seems to be the default, because people treat it as the default.
Git is definitely the best tool for open source projects, but as @akien-mga said in closed teams the situation is different, since there you don't need the core features of Git and once you look into the different tools you will find quite a few good reasons to pick something else.

Yes, as I said, assuming that users are using git is not correct hence Godot should feature auto-generated ignore lists for multiple popular VCSs, not just git. However, my concern is that it might be difficult to settle on which are 'popular' VCSs and which are not. So we either risk part of the community grumble that their VCS of choice is not included in the list, or, if we try to avoid that, the list of supported VCSs might end up being quite long. Not sure if this concern is reasonable or I'm being overly cautious. Just sharing my thoughts here....

Well, if someone has a different experience please chime in, but I'd say there aren't that many popular VCSs.
Besides Git there's SVN, Mercurial and Perforce (by order of estimated popularity). The next ones are probably Plastic and Fossil, and I would be surprised if anyone complained when they aren't supported out of the box.

Unity supports SVN, Plastic and Perforce out of the box, but I guess that's mostly because Unity is a commercial product and I suspect that Plastic and Perforce may have paid for that support.
Unreal supports SVN, Perforce and Git, but the Git support is experimental and provided by the community (afaik), and it makes sense that they built support for SVN and Perforce themselves because their workflow revolves around file locking which needs a central server.

So imho it would make sense to build in support for SVN, Mercurial and Git (the open source systems on the "most popular" list) and wait if someone asks for Perforce or another VCS (or posts a pull request themselves).

Using the Git addon for the VCS Integration in Godot actually creates a .gitignore file as soon as you initialise the Git repo for the project through Project > Version Control > Set Up Version Control > Initialize.

This solves the OP's issue but in a different way, which is not handled by Godot technically.

This plugin also creates a .gitattributes file just in case

Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine.

The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker.

If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance!

Was this page helpful?
0 / 5 - 0 ratings