> For the complete documentation index, see [llms.txt](https://docs.n8n.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.n8n.io/administer/use-source-control-and-environments/compare-versions.md).

# Compare versions

Workflow diffs allow you to visually compare changes between the workflow you have on an instance and the most recent version saved in your connected Git repository. This helps you understand the exact changes to the workflow before you decide to either push or pull it across different environments.

{% hint style="info" %}
**Feature availability**

* Available on Enterprise
* Workflow diffs are only available when you [enable the environments features](/administer/use-source-control-and-environments/set-up-source-control.md) on an instance
  {% endhint %}

## Accessing workflow diffs <a href="#accessing-workflow-diffs" id="accessing-workflow-diffs"></a>

You can access workflow diffs from two locations:

1. **When pushing changes**: Click the workflow diff icon in the commit modal alongside the workflow you want to review
2. **When pulling changes**: Click the workflow diff icon in the modified changes modal alongside the workflow you want to review

## Understanding the workflow diff view <a href="#understanding-the-workflow-diff-view" id="understanding-the-workflow-diff-view"></a>

When you open a workflow diff, n8n displays two workflows stacked vertically:

### When pushing <a href="#when-pushing" id="when-pushing"></a>

* **Top panel** (Remote branch): Latest version in your Git repository
* **Bottom panel** (Local): Current locally saved version of the workflow

### When pulling <a href="#when-pulling" id="when-pulling"></a>

* **Top panel** (Local): Current version on your n8n instance
* **Bottom panel** (Remote branch): Version you're pulling from the Git repository

In both cases, the top panel always displays the workflow that will update with changes.

The diff view highlights three types of changes:

* **Added nodes and connectors**: New node additions or connectors will show as green along with an "N" icon
* **Modified nodes and connectors**: Modifications to existing nodes or connectors will show as orange along with a "M" icon
* **Deleted nodes and connectors**: Node or connector deletions will show as red along with a "D" icon

## Reviewing node changes <a href="#reviewing-node-changes" id="reviewing-node-changes"></a>

For modified nodes, you can also compare the specific changes. Click modified nodes to show a JSON diff of the changes. You can review the exact configuration for that node before and after the given change.

## Viewing the summary of changes <a href="#viewing-the-summary-of-changes" id="viewing-the-summary-of-changes"></a>

In the top-right corner, the **changes** button shows the number of changes. This represents the total number of changes across node and node connectors, as well as general workflow settings updates.

## Navigating through each change <a href="#navigating-through-each-change" id="navigating-through-each-change"></a>

You can use the **next** and **previous** arrows in the upper-right corner to cycle through your changes in a logical order. Use the **back** button in the top-left corner to return to the commit or pull modal to select a different workflow to review changes on.

## Who can use workflow diffs <a href="#who-can-use-workflow-diffs" id="who-can-use-workflow-diffs"></a>

Only users who can push or pull commits for an instance can access workflow diffs:

* instance owners
* instance admins
* project admins


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.n8n.io/administer/use-source-control-and-environments/compare-versions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
