Duplicating a project


#1

Hello!

I’ve been wondering if we can duplicate a project on defold, i.e starting a new project from an existing project rather than starting from a blank state.

Does it work if I copy the project locally and then open the project from disk rather than importing it from the dashboard? (I could’ve tried it but I don’t want to mess things up :stuck_out_tongue_closed_eyes: )

This is helpful when you want to create multiple versions of the same game.

Thanks!


#2

Yes this is possible. You can create a new project from the dashboard, and you can create a new branch from within Defold. I think that’s the best solution (unless there is a specific reason you want to duplicate a project).


#3

Yes. Personally, I haven’t used the dashboard at all since Editor 2 became fully usable. I just copy stuff around my drive like a normal person (in the old days). :stuck_out_tongue: If you want to have the duplicate as another dashboard project, the simplest way is to:

  1. Make a new project on your Dashboard
  2. Make a “branch” of the new project on your hard drive with the editor
  3. Copy the project files from your template to the new project folder (overwrite everything or delete everything first)
  4. Sync the new project with the dashboard.

It’s just Git behind the scenes. You can host the project wherever you want, or not at all. There is a HOWTO: Alternative project hosting thread if you want to move it.

The editor’s Git features are really basic, so I use Git with the command line or an external GUI. I keep everything local if I’m just messing around, and put it up on Github (for public) or Bitbucket (for private) if I’m ready to share the project or just “get serious”. I have at least 20 small projects that only exist on my hard drive. I keep my template project handy and duplicate it when I want to try something new.


#4

… I am just getting back to this and it is WAY more complicated than I thought. Ross.Grams’s method appears to only update the original, rather than the newly created project. Can anyone tell me the best way to make a duplicate of a project?

Thanks!


#5

Did you only copy the actual project files? You must not copy the .git folder, and probably shouldn’t copy the .internal or build folders either.


#6

The .git folder is the one you must avoid, because it contains all the version control info, remote repository URL and other things linking to the original project.