AnkiGit

AnkiWeb addon 1384407975

Provides Git-based version control for Anki collections by exporting notes as Markdown, enabling diffs, selective import/export, conflict resolution, auto-snapshots, and remote push.
AI-generated summary; may contain mistakes.

importexportsync-integrationbackup-maintenance

Open on AnkiWeb GitHub Ask about alternatives

AnkiWeb

Rating
1 (๐Ÿ‘ 1 ยท ๐Ÿ‘Ž 0)
Updated
2026-05-28
Anki versions
25.09.2~
Description language
en

Maintenance

active

  • Last update or commit was 109 days before the snapshot (2026-06-14).
  • The repository has 15 test files.
  • The repository has 1 GitHub Actions workflows.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
25.09.2+2026-05-28
History across monthly snapshots

Loadingโ€ฆ

Similar addons

Anki Markdown Notes

Imports Markdown notes into Anki for Basic or Basic (and reversed) cards, using folder structure for decks, emphasizing Markdown-only editing and backups.

card-creationimportexport

Rating 1 ๐Ÿ‘ 0 ยท ๐Ÿ‘Ž 1 โญ 38 Anki 2.1.41~ Updated 2021-03-14

README

AnkiGit โ€” Git Version Control for Anki

AnkiGit is an Anki addon that provides Git-based version control for your Anki collections. Export your collection to a human-readable Git repo, track every change, collaborate on decks, and roll back to any point in history.

Quick Install

Install directly from AnkiWeb:

Anki Code: 1384407975

Or browse at https://ankiweb.net/shared/info/1384407975

From source (development)

git clone <repo-url>
ln -s "$(pwd)/anki_git" ~/.local/share/Anki2/addons21/anki_git

How It Works

AnkiGit exports every note in your collection as a standalone Markdown file inside a Git repository. Snapshots happen on demand or automatically on close โ€” each commit records the full state of your collection in human-readable form.

Example Note Format

Each note becomes decks/<DeckName>/<nid>.md:

# Note
guid: dc6H$t-~MK
notetype: iKnow! Sentences

### Tags
languages
japanese
jp-sentences
jp-transportation

## Expression
้ง…ใ‹ใ‚‰ใฏใ‚ฟใ‚ฏใ‚ทใƒผใซ<b>ไน—ใฃใฆ</b>ใใ ใ•ใ„ใ€‚

## Meaning
Please take a taxi from the station.
ไน—ใ‚‹ -- ride, take

## Reading
ใˆใ ใ‹ใ‚‰ใฏ ใŸใใ—ใƒผ ใซ <b>ใฎใฃใฆ</b> ใใ ใ•ใ„

## Audio
[sound:e3c984736d8b1c2bdc467f2a1c98659a.mp3]

## Image_URI
<img src="e2d8a60b59f2be8ebcbffafa165c7a0d.jpg">

## iKnowID
sentence:247153

## iKnowType
sentence

Notetypes are stored as YAML under notetypes/<Name>/ with CSS separated into style.css.

Screenshots

Diff Preview Settings
Diff UI Config UI

Features

  • Export โ€” snapshot your collection to a Git repo (one Markdown file per note)
  • Incremental export โ€” only re-export changed notes since the last snapshot
  • Import โ€” apply changes from your Git repo back into Anki
  • Selective import โ€” pick individual notes and notetypes to import via checkboxes
  • Diff preview โ€” git-style diff viewer before export/import
  • Conflict resolution โ€” three-way merge detection with a Qt dialog and auto-resolve modes
  • Notetype tracking โ€” clean YAML export with CSS separated into its own file
  • Auto-import on startup โ€” automatically check for repo changes when Anki opens
  • Auto-snapshot on close โ€” snapshot changes when Anki closes
  • Remote push โ€” auto-push to GitHub/GitLab after snapshot
  • Progress feedback โ€” animated progress bar with step-by-step status during operations

Development

uv sync                           # create venv + install deps
uv run pytest tests/ -m "not integration"   # engine-layer tests only
uv run pytest tests/              # all tests (needs anki/aqt)
uv run ruff check anki_git/ tests/           # lint
uvx ty check .          # type check
python3 build.py all              # creates .ankiaddon in build/

Architecture

See docs/architecture.md for the full architecture overview, module dependency graph, core flow diagrams, and sequence diagrams.

License

AGPL-3.0-only