# Resolving git merge conflicts for flow.json

**URL:** <https://discourse.nodered.org/t/resolving-git-merge-conflicts-for-flow-json/32472>\
**Category:** General\
**Created:** [5 September 2020 13:36 UTC](https://discourse.nodered.org/t/resolving-git-merge-conflicts-for-flow-json/32472 "2020-09-05T13:36:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mannharleen](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mannharleen/32/25594_2.png) [@mannharleen](https://discourse.nodered.org/u/mannharleen)\
**Post date:** [5 September 2020 13:36 UTC](https://discourse.nodered.org/t/resolving-git-merge-conflicts-for-flow-json/32472/1 "2020-09-05T13:36:16Z")

</div>

Typically, more than one of us are working on the same project 'locally'. We would follow the usual the git approach:

- Master branch exists
- For change 1, I create:
  - feature1 branch (checkout from master)

- For change 2, my colleague creates:
  - feature2 branch (checkout from master)

This is a classic case of stumbling upon merge conflicts. Thankfully, we use "flowFilePretty: true," so I can see the conflicts. However, **its a pain to resolve** this when the flows become bigger.

### A conflict would typically look like this:

- This is the the use case, where master branch was blank and I create a tab named 'Flow 1' while my colleague created a tab named 'Flow 4'

```auto
[
    {
<<<<<<< HEAD
        "id": "68a9fd8.53aaa04",
        "type": "tab",
        "label": "Flow 1",
=======
        "id": "9e7a581a.b664c8",
        "type": "tab",
        "label": "Flow 4",
>>>>>>> dev2
        "disabled": false,
        "info": ""
    }
]

```

# Ques: Is there a better way to resolve conflicts in NR flow.json?

For instance, I am taking a look at [https://github.com/jonatanpedersen/git-json-merge](https://github.com/jonatanpedersen/git-json-merge)  
But are there any other ways? Perhaps a git merge driver written for NR flow.json file?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [4 November 2020 13:36 UTC](https://discourse.nodered.org/t/resolving-git-merge-conflicts-for-flow-json/32472/2 "2020-11-04T13:36:22Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
