Skip to content
toolbelt
Back to Guides

Spotting What Actually Changed in a Config File

By ·

Updated

You edited one line and the pull request says 400. Reading a diff properly saves you from approving the wrong thing.

What is this tool?

A diff shows the minimum set of edits that turns one text into another. Everything unchanged appears as context; additions and removals are marked.

How it works

I compare line by line using a longest common subsequence, trimming the identical beginning and end first so that files which mostly agree stay fast. Removals come from the left text, additions from the right.

Example

  server:
-   port: 8080
+   port: 9090
    host: localhost

When to use it

Before committing a config change. Comparing a local file with what is deployed. Reviewing a colleague’s edit when you do not have their branch.

Optimization Tips

If every line shows as changed, check line endings or indentation first. That is almost always the cause, and the real change is hiding inside the noise. Reading the removed lines first tells you what the previous behaviour was, which is usually what you need to know.

Frequently Asked Questions

Does it ignore whitespace?
No, deliberately. In YAML and Python, a whitespace difference is a behaviour difference.
Why does a moved block show as removed and added?
Because a line diff does not detect moves, only insertions and deletions. That is normal.
How large can the inputs be?
Tens of thousands of lines stay responsive. Beyond that it switches to a faster, less precise comparison.
Is my text uploaded?
No. Both sides stay in your browser.

Ready to try it out?

Put this knowledge into practice with our free tool.

Go to Tool

Related tools