0 votes

Quick question,

What do you all do for backup / version control?

I've not done it much before and really don't understand it all that well but I've got to the point where I'd REALLY like an undo option and I know version control can offer this.

Also, I understand I can't save in the default GDscript extensions, that I must use XML when using VC. Is that really correct? If so I may need to re-save all my files and link to them again with the XML format.

Any advice appreciated. Rob

in Engine by (825 points)

2 Answers

+3 votes
Best answer

If you're referring to ".scn" and ".res" extensions when you say "default GDscript extensions", then yes you'll need to change those but you don't need to use XML, you can use ".tscn" and ".tres" since they're text based formats they can go well with version control.

edit: I use git btw, using just a local repository can save your project sometimes. =]

by (88 points)
selected by

Thank you, your answer makes a lot of sense. I'll go about re-organising my project into text versions of the files so I can start using GIT. A bit to learn :-)

I highly agree with this. XML will be deprecated in 3.0, so .tscn and .tres are the only choices. They are both much cleaner than XML, as well.

This info is from this post on the Godot website.

For 3.0, this format will be the only text based format supported, and XML will be deprecated.

Also it should be noted that not all things should be .tcsn or .tres, for example imported 3D scenes should be .scn instead, because they contain a lot of vertex data that would take a long time to load with a text format, so keeping it binary is preferred. Of course the scene can be inherited and the new scene can be a .tscn since it wont contain extra vertex data.

Great advice on all fronts. Hopefully this thread will also help others in the future.

Well, I'm happy. I can now create branches, merge them, correct conflicts. I'm away. :-)

0 votes

I am using local git repository so that I can easily revert back something. Once when creating a level, I realized that I was changing an existing level, but I was way past modifying it. And Godot undo is not so well even if it is good I will lose one of my levels. But I saved the scene with a new name and a simple git checkout oldlevelname made that old level back without losing the new level.

So version control really helps.

I also don't know much about git. I recommend you start with a local repository and you can go for remote ones as you learn.

Basic things to know are git status, git add, git commit, git checkout.

by (750 points)

Thank you, just installed GIT and am busy learning the basics at https://www.codecademy.com/en/courses/learn-git

Now to find a nice GIT GUI for OS X.

Git comes with a built-in simple GUI, which can be invoked by typing git gui in the command line from anywhere in your repo. On Windows it even has a context menu entry in the file explorer (not sure about Mac though). Many people I know seemed to be unaware of this^^

Thank you, I just checked it out. I have to admit that whilst it's undoubtedly handy I quite like GitHub Desktop. It took me 10 minutes and I had it all sorted out (after doing the codecademy lessons of course).

For a local repository it might not matter much if you don't care about a readable git history, but generally I tend to advise againt using git GUIs, and prefer to use the command line directly. Git is confusing and hard to learn, and GUIs make it even harder IMO to learn things "right" by hiding what git features it uses (fetch, pull, merge, rebase, etc.).

If you want to be able to have a readable git history, contribute to open source git repos, or work in a bigger team using git, you won't regret learning the basics of the git command line.

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 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.