Resolving git merge conflicts for flow.json

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'
[
    {
<<<<<<< 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
But are there any other ways? Perhaps a git merge driver written for NR flow.json file?

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