This code is useful for backup the flow at every commit of node-red.
The script actually backup the following file:
- $HOME/.node-red/flows_$HOSTNAME.json
- $HOME/.node-red/flows_$HOSTNAME_cred.json
cloning in the same directory with a new name with timestamp.
These should be the default names for any install, but if yours are in a different place, modify the actual URL in the function nodes.