Source control in Ignition 8

I read here that source control can be used in Ignition 8.

All resources can now be tracked with industry standard source control tools, such as Git. Resources can be tracked individually, and changes to disk caused by source control operations (checkout, pull, etc) will be applied automatically to the running system.

I havent found any tutorials or documentation pages for setting this up. Are there currently any resources I can turn to for this?
Alternatively, I know that if I had access to the files I could set up source control myself. Where can I find the root folder for scripts?

Im certain this is a hot topic and has been answered already, but I’ve done searches and I cant find an answer to my question.

Thanks for your help.

All project resources are located in the gateway installation directory (if you’re on, say, Windows, this defaults to Program Files/Inductive Automation/Ignition/. From there, project resources are in /data/projects/. Each project will have a folder there, and all resources within that project are then separated into modules. Below each module is a folder structure representing the path that you see in the designer.

An individual resource is itself a folder, containing at minimum two files: a resource.json file that defines meta-information about the resource, and a data.bin file, which contains the direct Java serialization of the actual resource. Some resource types, but not all, have different representations; for instance, project scripts are directly encoded as files, which are plain text, while Perspective views are their direct JSON representation.

As of right now, in Ignition 8.0.X, that’s basically all the “source control” integration you get. Triggering commits, reverting, etc, is all an exercise for the user. In fact, you would probably need to write a custom module if you wanted to do on-demand “commits” every time a save was pushed from the gateway. But, if you just want to rely on a system like git to perform periodic commits (and safe resource rollback), you’re set.

Future plans include, at minimum, scripting hooks to allow you to directly run commits and various other actions once you’ve configured a git or other VCS repository.

1 Like

I appreciate the very detailed response. Thank you for your help.

Thanks for this help - I added my entire projects folder to a repo to capture any project changes, I know the .resource folder gets recreated if it’s missing - any issues with one repo for all projects? so far seems to be working fine for me

No, the main thing is keeping track of things. Also, since my original post, we’ve added a project update scripting hook; it’s pretty barebones at the moment, but you could use system.util.execute() to trigger a git commit on project update (theoretically).

Super cool thank you - Ill probably use that for my production project, keep development on manual pushes. Either way working well so far.