version_control_systems.rst 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. :article_outdated: True
  2. .. _doc_version_control_systems:
  3. Version Control Systems
  4. =======================
  5. Introduction
  6. ------------
  7. Godot aims to be VCS friendly and generate mostly readable and mergeable files.
  8. Godot also supports the use of version control systems in the editor itself.
  9. However, VCS in the editor requires a plugin for the specific VCS you are using.
  10. VCS can be setup or shut down in the editor under **Project > Version Control**.
  11. .. image:: img/version_control_menu.png
  12. Official Git plugin
  13. -------------------
  14. Using Git from inside the editor is supported with an official plugin.
  15. You can find the latest releases
  16. `here <https://github.com/godotengine/godot-git-plugin/releases>`__. Documentation on how to use the Git
  17. plugin can be found
  18. `here <https://github.com/godotengine/godot-git-plugin/wiki>`__.
  19. Files to exclude from VCS
  20. -------------------------
  21. There are some files and folders Godot automatically creates. You should add them to your VCS ignore:
  22. - ``.godot/``: This folder stores various project cache data. ``.godot/imported/`` stores
  23. all the files the engine imports automatically based on your source assets and their
  24. import flags. ``.godot/editor/`` holds data regarding the editor state, such as currently
  25. opened script files, and recently used nodes.
  26. - ``*.translation``: These files are binary imported translations generated from CSV files.
  27. - ``export_presets.cfg``: This file contains all the export presets for the
  28. project, including sensitive information such as Android keystore credentials.
  29. - ``.mono/``: This folder stores automatically-generated Mono files. It only exists
  30. in projects that use the Mono version of Godot.
  31. .. tip::
  32. Save `this .gitignore file <https://raw.githubusercontent.com/github/gitignore/master/Godot.gitignore>`__
  33. in your project's root folder to set up file exclusions automatically.
  34. Working with Git on Windows
  35. ---------------------------
  36. Most Git for Windows clients are configured with the ``core.autocrlf`` set to ``true``.
  37. This can lead to files unnecessarily being marked as modified by Git due to their line endings being converted automatically.
  38. It is better to set this option as::
  39. git config --global core.autocrlf input
  40. Known issues
  41. ------------
  42. **Always close the editor** before running ``git pull``! Otherwise, you may
  43. `lose data if you synchronize files while the editor is open <https://github.com/godotengine/godot/issues/20250>`__.