Git workflow in Defold

It seems to me that when working with the Defold editor that new branches are only local. In other words, using the new branch command only creates a local new branch, not one on the Git server. Synchronizing your changes does not synch with the branch you’ve created it is merged into the current “master” branch. Is this an accurate view?

I have discovered that if you are using an external Git tool (e.g. GitHub Desktop) you can create a branch off of the master (and select it as the current branch) and when you synchronize from the Defold editor you synch back into that selected branch. Of course, this means that you must merge back into the true master branch yourself. It would be nice if we had the option of using a more sophisticated branching approach but this works fine.

BTW, I really like Defold! :smile_cat:

2 Likes

The built in support for Git is primitive and as you’ve already discovered the New Branch command doesn’t actually create a new branch. It simply makes a new clone of the master branch into a folder with the name you specify. If you want to work with different remote branches you should use an external Git tool such as Github for Desktop or Sourcetree and only use that tool instead of the built in Git support.

2 Likes

The way branching works currently was our attempt to simplify git for users not familiar with version control. Unfortunately it has confused more than helped people it seems. We need to improve it in time, and my guess would be that this is something we would look at after shipping editor2.

4 Likes

Thanks for the quick reply. Better version control would be nice but, like you both, I feel that it is a lower priority item. I’m liking Defold very much and I’m looking forward to version 2. However, I’m really looking forward to Defold SAGA. :grin:

4 Likes

Expecting to see a better Git implementation in the future. :slight_smile:

We might make improvements but don’t expect it to become a replacements for a stand alone Git tool such as Source Tree, Git Tower, Kraken or the command line.

What would you say would be the biggest improvement from what is currently provided from the builtin Git tools?

Revision history?
Ability to sync changes to one of the previous revisions?

1 Like

I’m guessing this would be a fairly trivial addition. Am I right @Erik_Angelin?

Hmm, once we start adding UIs for merging, branching, cherry-picking and so on we start competing with the external tools out there and at that point it’s probably a lot more effort to make something useful.

Just printing the revision history shouldn’t be that hard, but if it’s there - you probably want to be able to interact with it, step forwards/backwards in the history to do comparisons etc. As you say, we don’t really want to compete with excellent external tools. But please add any feature suggestions to https://github.com/defold/editor2-issues/issues and we’ll discuss!
Thanks!

1 Like