# Programatic diff of flows

**URL:** <https://discourse.nodered.org/t/programatic-diff-of-flows/3124>\
**Category:** General\
**Created:** [13 September 2018 17:10 UTC](https://discourse.nodered.org/t/programatic-diff-of-flows/3124 "2018-09-13T17:10:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JpEncausse](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jpencausse/32/2561_2.png) [@JpEncausse](https://discourse.nodered.org/u/JpEncausse)\
**Post date:** [13 September 2018 17:10 UTC](https://discourse.nodered.org/t/programatic-diff-of-flows/3124/1 "2018-09-13T17:10:47Z")

</div>

No sure about the category

We are moving from 0.17 to 0.19 because we love the Git features ! But on various projects we have some tricky migration issues with flows and how we handle version.

Let's say I have a flow\_branch1.json and a flow\_branch2.json we want to merge

- On 0.17 we put the flow\_branch1.json
- Load Node-RED
- Show the dashboard
- Replace the flow by flow\_branch2.json
- Restart Node-RED
- The UI popup and ask for a Merge
- Save

Is there a programatic way to diff/merge (if there is no conflict) flows ?  
something like merge('flow\_branch1.json','flow\_branch2.json')

We don't use git diff ? because in 0.17 the json is scrambled and must be diff "in memory" that's why we'll move all project asap to 0.18 / 0.19 that are so clean 🙂
