Logo
NeoArc Studio

Handling Merge Conflicts

Learn how to resolve merge conflicts in NeoArc JSON files. Understand conflict patterns, use the right tools, and adopt practices that minimise conflicts.

NeoArc files are JSON, which makes them text-based and mergeable. But JSON has structure that must remain valid after a merge. Understanding how conflicts occur and how to resolve them keeps your documentation workflow smooth.

How Conflicts Happen

A merge conflict occurs when two branches modify the same part of a file in incompatible ways.

Anatomy of a JSON Conflict

Git marks conflicts with standard markers. The section between <<<<<<< and ======= is your current branch. The section between ======= and >>>>>>> is the incoming branch.

{
  "title": "My Page",
<<<<<<< HEAD
  "summary": "Original summary text",
=======
  "summary": "Updated summary from feature branch",
>>>>>>> feature-branch
  "content": [...]
}

Resolving Conflicts

Content Array Conflicts

The most complex conflicts occur in the content array when multiple blocks change. The array structure makes this tricky.

Resolving Content Array Conflicts

Using Merge Tools

Visual merge tools make JSON conflicts easier to resolve.

ToolDescription
VS CodeBuilt-in merge editor with Accept Current/Incoming/Both
Beyond CompareSide-by-side comparison
MeldThree-way merge visualisation
GitKrakenVisual Git client with merge tool
git config --global merge.tool vscode
git config --global mergetool.vscode.cmd 'code --wait $MERGED'

ModifiedDate Conflicts

A common conflict: both branches update modifiedDate. Resolution is simple: use the current date.

Preventing Conflicts

The best conflict is one that never happens. Practices that reduce conflicts.

Short-Lived Branches
The longer a branch lives, the more likely it diverges. Merge frequently.
Pull Before Pushing
Pull the latest main and merge or rebase before pushing your branch.
Coordinate on Shared Pages
If multiple people edit the same page, communicate and take turns.
Page-Level Granularity
Each page is a separate file. Changes to different pages never conflict.

After Resolving

Once conflicts are resolved and committed.

This documentation site is maintained through the same Git workflows, and the practices described here are how we handle conflicts in our own content.

Next Steps

Reviewing Documentation
Effective review practices in pull requests
Learn more →
Branching Strategies
Choose the right branching model
Learn more →
Offline Workflows
Working without network connectivity
Learn more →