Is there a way to have project save as from editor?

#1

Im used to a modular build up form of programming where you build a section, save as new project and then go to next section. This gives you a revert point in building your code.

In defold I have to exit goto my projects directory and do a copy and paste of the directory. where as this could be a quick way to save projects via a menu button. Im actually kinda surprised it doesnt exist in the editor.

0 Likes

#2

This is why we recommend that you use version control for your project. Defold has built-in support for Git which means that if you have your project hosted on GitHub you can save a snapshot of your project to Git and at any time revert back to that version.


4 Likes

#3

Ive been having problems with git- I think its my internet. I also throw a lot time out java errors in defold as well.

Ill get it solved eventually.

0 Likes

#4

I have git setup, have files on repository, cloned to local git hub, have git hub desktop installed, loaded project from the local cloned repository, but file synchronous says no project control- how do I turn it on inside of defold?

0 Likes

#5

You need a remote repository set up to use synchronise, not just a local one. GitHub is a remote service, so “local github” doesn’t make sense to me.

A “local” repository is one saved on your computer, while a “remote” repository is one stored on the cloud somewhere, usually GitHub.

You would need to use GitHub to make a remote repository, and then set up your local repository to use that remote repository to push (save your changes) and pull (grab new changes from the remote) from.

When you synchronise inside Defold, it will first pull from the remote, and then you can push to it to save your changes.

1 Like

#6

I have a remote repository on git hub and I cloned it to local the local repository. I can push and pull from git desktop back and forth. I am loading from the local repository into defold via open from disk.

but defold does not recognize that

0 Likes

#7

Until recently, I thought just like you. I’ve always been making local “hand made” copies of my projects to keep track of all my significant changes/milestones (most of the time with a google drive / dropbox synchronization :grin: just in case). Dirty (and dangerous) version control management from a developer perspective, for sure… I’ve always been aware of that but this method was somehow reassuring and I didn’t want to change my habits.

A few weeks ago, one of my experienced dev friends helped (“forced” :see_no_evil:) me onboard on Github, which was pretty counter-intuitive at first for a non-developer like me, even though I immediatly got his point. But Git Bash, command lines etc. Not really a user-friendly UX in my opinion.

After britzl’s answer I set up Github in Defold and I must admit it’s really convenient, seamless, straight-forward… and safe :nerd_face: Really cool to have it directly in the editor. It naturally became part of my workflow… Looking forward to using it in an actual teamwork context.

But still, even with this version control… Sometimes I like to have two versions of the same project, opened at the same time, to compare them and see in “real time” the impact of very specific changes, or test stuff on both… When it happens, I do just like you => I manually duplicate the cloned folder (to create a temporary copy) and open 2 Defold instances. Once I’ve checked/tested what I wanted, I delete the temporary folder.

2 Likes

#8

The other thing which has nothing to do with version control- is the ability to save template as new projects.

When I write a portion of a program I try to keep it separate and useful as template or library to be able to easily use in new projects. To do that means to close your software and cut and paste the project directory to a new name.

Git does make sense, but so does the ability “to save as” why cant there be both?

0 Likes

#9

Working with Git from the command line is pretty scary at first, but after a while you start to get familiar with the basic operations (add files, commit changes, push and pull). BUT anything beyond that is going to be hard and this is where I prefer to use a graphical frontend to help me. I really like GitHub Desktop. It’s still pretty basic and doesn’t allow me to do more complex Git operations, but for 99% of the cases it works well. The Git integration in Defold is even more basic, but at least it saves you from using Git from a terminal.

0 Likes

#10

I may be wrong since I’m definitely not an expert, but I think that the “to save as” approach is just not compatible with any cloud-based version control.

The Git-like versioning relies on a local “cloned” folder, but when you “save as”, that sends you out of the cloned folder (to the new project’s folder) and the synchronization with Git gets problematic/impossible.

I suppose we could imagine a “save as” that doesn’t change the current project folder, but… that’s not how the “save as” feature usually works, so… that would be specific to Defold.

But I get your point when you mention the " project template" thing, this would be super useful for devs who start projects frequently… This could be a new Defold feature (you should make a feature request :nerd_face:).

Working with Git Bash (and its command lines) was scary at first, but quickly I found it time-consuming and meaningless… But using it really helped me understand how Git works (at least the basics).

As a wannabe developer, I find Git in Defold super convenient for basic/low-risk operations, and GitHub Deskop for “”“advanced”"" stuff.

0 Likes

#11

Apropos the project template thing. You can mark a Github repo as a “template project”, then you can one-click instantiate a new github repo based on it from Github’s web interface. Then it’s just a matter of cloning it locally (with Github desktop, CLI Git or using gh from the CLI), then opening it in Defold.

Example: https://github.com/critique-gaming/crit-boilerplate

2 Likes

#12

Wow! Thanks!

0 Likes

#13

It makes sense :slight_smile: Thanks!!

0 Likes