version_control_systems.rst 2.4 KB

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