I found only one topic that's close to my question but it's old and I'd rather not necro-bump.
I have a local Subversion server that I want to use for versioning my changes/additions to my work. I read about Projects but it doesn't seem to handle my case. So, what I need to know is the list of files that I need to put in my repository to save me from myself. I'm not going to put the entire ~/.node-red tree in there, just whatever holds my flows... and settings.js
In addition to setting flowFilePretty, before committing I run this script which generates a formatted version of the flows file (with the extension .formatted) which has function nodes formatted one line per line of source (rather than the function being all on one line). This allows diffs to be viewed which show line by line changes to function nodes. The formatted file has to be committed too of course. The formatted file cannot be used as the actual flows file, it is just for viewing diffs.
#!/usr/bin/env sh
# generates formatted versions of node red flow files matching flow*.json
# in files flow*.json.formatted
# NOTE must have flowFilePretty: true in settings.js
for f in flow*.json; do
echo $f
sed -r 's/\\n/\n/g' "$f" > "$f.formatted"
done
# remove any cred files converted
rm *_cred.json.formatted
I left out the .config.json since early versions of Node-RED because it doesn't contain anything useful in my setups. The node list is regenerated at start, I don't use projects and my credentials key is in the settings.js. So besides the user settings for the editor, there's nothing I would want in Git.
However, there's an interesting change coming: Split .config.json into separate files
So you will have better control over what goes into Git in the future.
For curiosity's sake, why would want the *.backup files in Git, too? Or did you just mean the .config.json?
Well, if you have arranged something so that you auto-commit on every change AND gave users the ability to undo changes via git, you wouldn't need it. Otherwise, the backup files are your users get-out-of-jail-free card in case they make a booboo or in case there is a write error when Node-RED updates the file (something that is improved in the next release).
I meant where did it come from and what is it for? I don't think it is part of the standard set of files, unless it is a Windows thing that I don't know about.
Do many still use SVN? I switched to git about 12 years ago I think.