Can Defold use Github?

Hi!

I’m evaluating Defold for use at our game studio, and I’m very impressed. However, I expect that doing development on servers we don’t have very tight control of would be a non-starter for our investors. Is there any way we can currently use a private repository on Github (or pay to get this capability?)

Thanks!

Karl

2 Likes

Hi!

Being able to use your own git server, or services such as GitHub, is one of our most requested features. :slight_smile: It’s certainly planned but I can’t say for sure a date when it will be implemented.

However, one workaround is to create an empty project and add your own remote server yourself through the git command line. This way you should be able to push any changes to this alternative remote git server but still have a “project instance” that our current editor can read/open. :blush: This means that you will need to do any synchronisation yourself outside the editor through a git interface, but it could ease the minds of investors. :smile:

Hope this helps!

1 Like

Thanks for your insight. I think this is probably a usable workaround; I’ll add my voice to the requests for native integration and see if this will work for the time being. :slight_smile:

2 Likes

Can someone explain how to use Github desktop together with Defold in a bit more detail?
I am new to using Github. I created a Github account and have downloaded/installed Github Desktop. I can clone/add Github projects to my Gh.Desktop: however I don’t understand the relation how Github can work together with Defold.

Ok, so, when you create a new Defold project from the dashboard a new git repo will be created on our server. When you open the project in Defold a git clone will be created in:

your_defold_install_folder/branches/project_id/your_defold_user_id/name/git_clone_ends_up_here

This means that you have a normal git repository clone in the above location. You can interact with it in three ways:

  1. Through the simple git functionality in the editor (Synchronize Project, Changed Files etc)
  2. Through git command line tools from a shell, terminal, command prompt
  3. Through a 3rd party visual git tool such as GitHub for Desktop, SourceTree, Git Tower etc

To use GitHub for Desktop you need to add the git repo. You do this by choosing File->Add Local Repository and browse to the root of your project. Click add and you’ll see the project in the list of Other repositories on the left (at least that’s the layout on a Mac). Remember that the project is still hosted on our server, but you now have the ability to create new branches, merge, do partial commits and stuff like that.

If you want to use a git repo hosted on GitHub instead of using our server you can create a new project on GitHub and change Repository->Repository Settings->Primary remote repository to the repository address as seen on the GitHub page of your project.

Oh man, I just realised that @sven has written an excellent step by step guide for this: HOWTO: Alternative project hosting

Yes it is an excellent guide but it doesn’t really address how I can use existing github repositories and that was basically my question :slight_smile:

how I can use existing github repositories

You mean one with other projects on it? That is not a good idea.

If you didn’t mean that can you rephrase your question?

Defold can basically do the same basic things Github Desktop can do. When you synchronize it’s pushing committed files to the remote server.

If you want to commit / push with Github Desktop you can add the repo to it

https://help.github.com/desktop/guides/contributing/adding-a-repository-from-your-local-computer-to-github-desktop/

You’ll still need to follow that guide to change the remote to point to a github hosted repo.

Well, I wanted to get the lowrezinvaders example in my Defold (which @Pkeod mentioned in the Big list of Defold Tips)

I know how to do this by hand (procedure in the ludum dare 35 thread) but @britzl there suggested that there was another (easier?) way to do it. So I tried to get it working with Github Desktop but got lost :slight_smile:

The bottleneck is Defold needing to have online auth for opening projects.

Try this

  1. Create a new project on Defold for it
  2. https://github.com/britzl/lowrezinvaders go here and click fork, this will put a copy of the repo into your own account
  3. Open the project in Defold right click and open in explorer, close Defold
  4. Delete all files in this directory including the .git
  5. Use Github Desktop to clone the fork you made into this folder
  6. Open Defold and then open the project, hopefully it works - I don’t know if Defold stores any meta data in the actual project folder other than relying on folder structure