HG-NBDIFF(1)
β¨ NAME β¨
hg-nbdiff β a mercurial external differ for notebooks π (yes bestie, it's giving notebook-specific diffing, and it ate)
π¦ DESCRIPTION π¦
okay so first things first, the vibe check on how you actually call this thing:
usage: hg-nbdiff [-h] [-s] [-o] [-a] [-m] [-i] [-d] [--color-words]
[--no-color] [--no-git] [--no-use-diff] base remote
A mercurial external differ for notebooks. πΈ
Here's the tea: instead of doing a plain text diff on the JSON of your notebook (which is, respectfully, a nightmare π), it uses nbdime to make actual diffs for notebooks. Go read the documentation for how to correctly configure mercurial to use this, because the config is lowkey important and I'm not gonna let you rawdog it.
Use it like this:
hg extdiff -p hg-nbdiff [<commit> [<commit>]]
π positional arguments
baseβ The base notebook filename. the before pic πΈremoteβ The remote modified notebook filename. the after pic β¨
π options
-h,--helpβ show this help message and exit. the classic "what does anything do" button π«Ά--color-wordsβ whether to pass the--color-wordsflag to any internal calls togit diff. rainbows inside your diffs π--no-colorβ prevent use of ANSI color code escapes for text output. for when you want it plain, no drama--no-gitβ prevent use ofgitfor formatting diff/merge text output. git stays in its lane--no-use-diffβ prevent use ofdiff/diff3for formatting diff/merge text output. bye felicia to the old-school tools
π§ ignorables
Set which parts of the notebook (not) to process. this is where you pick and choose, main character energy π
-s,--sources,-S,--ignore-sourcesβ process/ignore sources.-o,--outputs,-O,--ignore-outputsβ process/ignore outputs.-a,--attachments,-A,--ignore-attachmentsβ process/ignore attachments.-m,--metadata,-M,--ignore-metadataβ process/ignore metadata.-i,--id,-I,--ignore-idβ process/ignore identifiers.-d,--details,-D,--ignore-detailsβ process/ignore details not covered by other options.
pro tip bestie: the capital-letter versions are the ignore ones, the lowercase are the process ones. matching vibes, opposite intentions. iykyk π
okay that's the whole page, no cap π¦ mwah, go diff some notebooks π
hg-nbdiff 4.0.4 β that's the version, and this lil' page is dated February 2026 πΈβ¨ periodt.
π¦ where this page comes from
- fedora 43: python3-nbdime 4.0.4-1.fc43 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND LicenseRef-Fedora-Public-Domain
- fedora 44: python3-nbdime 4.0.4-1.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms