Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Diffing IDA databases with git diff

IDA databases (.i64, .idb) are binary files, so by default Git can only tell you Binary files a/db.i64 and b/db.i64 differ. With the IDA diff driver installed, git diff instead prints a readable, structural diff of the two databases, produced by IDA itself:

  • changed disassembly lines, names, comments, stack variables

  • changes to functions, local types, cross-references, segments, and more

The output is plain text in the familiar unified diff format, so it works in a terminal, in scripts, in CI jobs, and as input for AI agents that need to review what changed in an analysis.

A repository created or cloned through IDA includes an AGENTS.md/CLAUDE.md file that tells coding agents which exact commands to use for diffing, so they don't have to guess.

How it works

Git lets a repository assign a custom diff driver to a file pattern through .gitattributes. IDA ships a small helper, git-ida, which registers itself as the diff driver for *.i64 and *.idb. When Git needs to diff a database, it calls git-ida, which runs IDA headless (idat) on both versions of the database and passes the report back to Git.

The same helper also installs a filter that stores databases compactly (as deltas) and a merge driver for databases. Both run transparently.

Prerequisites

  • Git installed

  • IDA Pro installed and an active IDA license with Teams add-on

  • The git-ida version that ships with IDA 9.5 or later

Platform

Location of git-ida

Windows

<IDA dir>\tools\teams\git-ida.exe

Linux

<IDA dir>/tools/teams/git-ida

macOS

<IDA.app>/Contents/MacOS/tools/teams/git-ida

Setup from the command line

You do not need to open the repository in IDA. The steps below use $IDA_DIR for the IDA installation directory (on macOS, the Contents/MacOS folder inside the .app bundle).

First, run git ida install once per machine. See Making git-ida available to your shell for details. After that, a plain git clone of any git-ida repository checks out real databases right away, no further setup needed.

Enable it in a new repository

Running git ida initialize registers the filter, merge and diff drivers in the repository's local Git config. It also adds these lines to .gitattributes:

Point ida.path at the regular ida executable. The diff driver picks the console version (idat) next to it automatically.

Clone a repository that already uses it

Run git ida status at any time to check the configuration.

Examples

Compare the database on disk (saved but not yet committed) with the last commit:

Compare a database with its state from the previous commit:

Compare two branches:

Show what a commit changed:

git show and git log -p only use custom diff drivers when you pass --ext-diff.

List only the changed locations, one per line (useful in scripts or as a compact summary for an agent):

Skip the structural diff for one command:

Sample output

This commit renamed a stack variable to output_buffer:

Each hunk header names the area of the database that changed (here Disassembly/Items) and the location, as a name plus offset.

Notes and limitations

  • Each diff runs IDA on both versions of the database, so on large databases it can take a while.

  • git diff --stat, --numstat and --shortstat never call diff drivers, so for databases they only report that the binary file changed.

  • If anything goes wrong (IDA not found, timeout, and so on), the driver falls back to the standard Binary files ... differ line and prints the reason on stderr. The rest of the git diff output is not affected.

Configuration

All settings live in the repository's local Git config (git config --local <key> <value>):

Key
Default
Meaning

ida.path

Path to the IDA executable

ida.diff.enabled

true

Set to false to always show Binary files ... differ

ida.diff.timeout

120

Seconds allowed for one database diff (0 = no limit)

ida.diff.maxFileSize

0

Skip the structural diff for databases larger than this many bytes (0 = no limit)

To compare databases visually in the IDA GUI instead of in the terminal, use git difftool -- malware.i64.

Last updated

Was this helpful?