Features ›

Compare and merge

Two files, two folders, or your local copy against what is actually on the server. Then copy the differences across, export them as a patch, or resolve a conflict.

Folders, and servers

Compare two folders and Hydra lists every file that changed, exists only on one side, or is identical, compared byte for byte. Select one to see its differences underneath. Either side can be on a server: Hydra downloads a temporary copy, shows it read-only, and deletes it when you close the window.

This is the question nobody else answers well: is what is deployed what is in the repository? Here the live site has a hot-fix nobody committed.

  • Folder tree with a status on every folder, and an Exclude filter (*.log, build)
  • Ignore whitespace, line endings or case, and fold unchanged lines
  • Swap sides, compare again, or copy a whole file to the other side
  • Compare two servers with each other, not just a server with your Mac
A Compare window: the live web server against the local project, with config/app.yaml selected and its one changed line side by side

Line by line

Side by side or unified, with changed words highlighted, syntax colours, and a strip in the middle that shows where every change is in the whole file. Step through changes with ⌥⌘↑ and ⌥⌘↓.

Copy a change from one side to the other with the arrow beside it (or ⌥⌘← and ⌥⌘→), then save. Hydra keeps the file's encoding and line endings, and asks before closing with anything unsaved.

cart.js on the server against the local copy: a changed shipping threshold and a new function, side by side with changed words highlighted

Images and binary files

Two images compare as pictures: side by side, a swipe you drag across, an overlay that fades one into the other, or a difference view that paints every changed pixel red, with a count of how many changed. Any other binary file compares as hex, with the differing bytes marked.

Two versions of a logo compared with a swipe: the server's version left of the line, the local version right of it
The same logos in Difference mode: only the changed circle is red, over a faded copy of the original

4,181 pixels differ: the swipe, and the difference view.

Three-way merge

When Git stops on a conflict, Hydra shows Yours, the Result and Theirs in three columns. Answer each conflict with Yours, Theirs, both in either order, or the common ancestor. The window moves to the next conflict as you go, and Save stays off until every conflict has an answer, so a file is never written back half-resolved.

When the right answer is a mix of both sides, double-click the conflict and type it. Hydra shows both versions (and the base) above the editor, and your text becomes that conflict's answer.

Editing a conflict by hand: Yours, Base and Theirs for reference above, and a result that combines both versions
The merge with every conflict answered: one taken from Yours in green, one typed by hand in blue, and Save enabled

Patches, and the command line

Copy any comparison as a patch, or save it to a file, in the format git apply and patch -p1 read. Or ask from Terminal, where either side can be a server:

hydra diff "web:/var/www/bluebird" . --patch --exclude ".env,*.png"
hydra diff old.sql new.sql                 # opens the Compare window
pbpaste | hydra diff - config.yml          # the clipboard against a file

Comparisons also start from File › Compare Files or Folders…, Compare Clipboard with File… and New Text Comparison, or by dropping files on either half of the window.

A file dragged from Finder over the left half of a Compare window, which says Compare with this as A
Terminal: hydra diff with --patch prints the differences between the server and the local copy as a unified diff

Git's diff and merge tool

One command makes Hydra the tool git difftool and git mergetool open. It waits while you work and tells Git whether the merge was saved resolved.

hydra git-setup           # shows the settings
hydra git-setup --apply   # writes them to ~/.gitconfig

Try it on your own servers

Fourteen days, everything unlocked, no account required.

Download for macOS