Using GitHub to track changes produced in flows is not helpful

Hello!

I want to be able to track changes to individual nodes using git. However, I did not want to set up Node-Red Projects (access to settings is restricted).

So at present, I am exporting all the nodes in a tab, naming the file according to the tab name (e.g. "Flow 1.json"), and checking them into a folder under git control.

But when I make a simple change (like changing the position of 1 node as a test) the export JSON cannot be easily diff'ed as Node-Red has internally made changes. There were almost 1000 additions and a similar number of deletions, in a 56 node tab.

I read that this is to be expected and that a potential solution is to introduce a step before saving to the git repo step, and somehow sort the contents of the JSON routinely in the same manner so that git diff doesn't have to deal with order.

Is this something that can be done inside Node-Red?

Hi!
I'm pretty sure it's not in the core of Node-RED.
You yet could write your own plugin that hooks into the process of deploying - and thus ensure a given sort order.

Thank you! I will explore that. I didn't know that plugins could hook into the deploy process.