On 5 December 2016 at 20:17, Csongor Varga <
csongo...@gmail.com> wrote:
> Hi Colin,
>
> Thanks for the response. Just to make sure I am getting this right. We are
> talking about the flows_xxxx.json file in .node-red folder, right? And I am
> guessing settings.js is also quite important.
I commit all files in the node-red folder except *.backup
>
> I am not too familiar with git other than how to download packages. You can
> commit to git from command line? And you have a cron job to do all this?
Git is a command line utility, though there are some excellent gui
addons, in particular git-gui and gitk. I don't commit automatically,
just when I feel it appropriate. So I run the sed script, check the
diffs (using git diff or git gui if in gui environment) to make sure
that what has changed looks right and then commit it. There are some
great advantages when using git. For example you have been doing some
restructuring of the flow but have not quite got it fully working, and
time has run out. Simple run
git stash
and git will save your changes and restore the flows to the previous
committed state (which presumably was a working system). Restart node
red to get it to pick up the changes and you are back with a working
system. Then when you are able to continue simply
git stash apply
and git will restore your work at the point you stashed it.
Once you get the hang of how to use git you will wonder how you
managed without it.
Cheers.
Colin