C Git Compatibility

This document lists Git functionality and indicates what Dulwich supports. Dulwich is a pure Python implementation of Git that provides wire-format and repository format compatibility with C Git.

Legend:

  • ✓ - Fully supported

  • ◐ - Partially supported

  • ✗ - Not supported

Main Porcelain Commands

Repository Management

  • git init - Initialize repository

  • git clone - Clone repository

  • git config - Read and write configuration

Working with Files

  • git add - Add file contents to the index

  • git rm - Remove files from working tree and index

  • git mv - Move or rename file, directory, or symlink

  • git restore - Restore working tree files

  • git reset - Reset current HEAD to specified state

  • git clean - Remove untracked files

Commits

  • git commit - Record changes to the repository

  • git show - Show various types of objects

  • git log - Show commit logs

  • git shortlog - Summarize git log output

  • git describe - Describe a commit using the most recent tag

  • git annotate - Annotate file lines with commit information

  • git blame - Show what revision and author last modified each line

  • git citool - Graphical alternative to git-commit

  • gitk - Git repository browser

Branches

  • git branch - List, create, or delete branches

  • git checkout - Switch branches or restore working tree files

  • git switch - Switch branches

  • git show-branch - Show branches and their commits

  • git worktree - Manage multiple working trees

Tags

  • git tag - Create, list, delete, or verify tags

  • git verify-tag - Check GPG/SSH signature of tags

  • git verify-commit - Check GPG/SSH signature of commits

Merging

  • git merge - Join two or more development histories

  • git merge-base - Find common ancestor for merge

  • git mergetool - Run merge conflict resolution tool interactively

  • git rebase - Reapply commits on top of another base tip

  • git rebase -i - Interactive rebase (limited support)

  • git cherry-pick - Apply changes introduced by existing commits

  • git revert - Revert existing commits

  • git cherry - Find commits not merged upstream

Remotes

  • git fetch - Download objects and refs from another repository

  • git pull - Fetch from and integrate with another repository

  • git push - Update remote refs along with associated objects

  • git remote - Manage set of tracked repositories

  • git ls-remote - List references in a remote repository

Inspection

  • git status - Show the working tree status

  • git diff - Show changes between commits, commit and working tree, etc

  • git grep - Print lines matching a pattern

  • git bisect - Use binary search to find commit that introduced a bug

Patching

  • git format-patch - Prepare patches for email submission

  • git am - Apply series of patches from mailbox

  • git apply - Apply patch to files

  • git mailsplit - Simple UNIX mbox splitter program

  • git mailinfo - Extracts patch and authorship from a single email

  • git send-email - Send collection of patches as emails

  • git request-pull - Generate summary of pending changes

Debugging

  • git fsck - Verify connectivity and validity of objects

  • git check-ignore - Debug gitignore / exclude files

  • git check-mailmap - Show canonical names and email addresses

  • git instaweb - Instantly browse your working repository

Administration

  • git gc - Cleanup unnecessary files and optimize repository

  • git reflog - Manage reflog information

  • git filter-branch - Rewrite branches

  • git maintenance - Run tasks to optimize Git repository data

  • git prune - Prune all unreachable objects

  • git repack - Pack unpacked objects in a repository

  • git count-objects - Count unpacked number of objects

Server Side

  • git daemon - A really simple server for Git repositories

  • git update-server-info - Update auxiliary info file

  • git upload-pack - Send objects packed back to git-fetch-pack

  • git receive-pack - Receive what is pushed into the repository

Other

  • git archive - Create archive of files from named tree

  • git bundle - Create, unpack, and manipulate bundle files

  • git stash - Stash changes in dirty working directory

  • git submodule - Initialize, update or inspect submodules

  • git subtree - Manage subtrees in repository

  • git notes - Add or inspect object notes

  • git replace - Create, list, delete refs to replace objects

  • git rerere - Reuse recorded resolution of conflicted merges

  • git help - Display help information

  • git fast-export - Export repository data (API only, see fastexport module)

  • git fast-import - Import repository data (API only, see fastexport module)

  • git gui - Portable graphical interface to Git

  • git web--browse - Launch web browser to view HTML documentation

  • git difftool - Show changes using external diff tool

  • git range-diff - Compare two commit ranges

  • git bugreport - Collect information for bug reports

  • git diagnose - Display diagnostic information about the environment

  • git fsmonitor--daemon - Filesystem monitor daemon

  • git scalar - Manage large Git repositories

Plumbing Commands

Manipulation

  • git apply - Apply patch to files

  • git checkout-index - Copy files from index to working tree (API only)

  • git commit-tree - Create new commit object

  • git hash-object - Compute object ID

  • git index-pack - Build pack index file (API only)

  • git merge-file - Run three-way file merge (API only)

  • git merge-tree - Show three-way merge without touching index

  • git mktag - Create tag object

  • git pack-objects - Create packed archive of objects

  • git prune-packed - Remove extra objects (API only)

  • git read-tree - Read tree information into index (API only)

  • git symbolic-ref - Read, modify and delete symbolic refs

  • git unpack-objects - Unpack objects from packed archive

  • git update-index - Register file contents in working tree to index (API only)

  • git update-ref - Update object name stored in a ref

  • git write-tree - Create tree object from current index

  • git mktree - Build tree object from ls-tree formatted text

Interrogation

  • git cat-file - Provide content or type and size information

  • git diff-files - Compare files in working tree and index (API only)

  • git diff-index - Compare content and mode of blobs (API only)

  • git diff-tree - Compare content and mode of trees

  • git for-each-ref - Output information on each ref

  • git ls-files - Show information about files in index and working tree

  • git ls-remote - List references in remote repository

  • git ls-tree - List contents of tree object

  • git merge-base - Find common ancestor

  • git name-rev - Find symbolic names for revisions (API only)

  • git pack-refs - Pack heads and tags for efficient repository access

  • git rev-list - List commit objects in reverse chronological order

  • git rev-parse - Pick out and massage parameters (see also objectspec module)

  • git show-index - Show packed archive index

  • git show-ref - List references in local repository

  • git var - Show Git logical variable

  • git verify-pack - Validate packed Git archive files (API only, see pack module)

Syncing

  • git fetch-pack - Receive missing objects from another repository (CLI available)

  • git http-fetch - Download from remote Git repository via HTTP (API only)

  • git send-pack - Push objects over Git protocol to another repository (API only)

  • git update-server-info - Update auxiliary info for dumb servers

  • git http-push - Push objects over HTTP to another repository

  • git upload-archive - Send archive back to git-archive

Pack Management

  • git multi-pack-index - Manage multi-pack-index (API only, see midx module)

Internal Helpers

  • git check-attr - Display gitattributes information (API only, see attrs module)

  • git check-ignore - Debug gitignore / exclude files

  • git check-mailmap - Show canonical names and email addresses

  • git column - Display data in columns

  • git credential - Retrieve and store user credentials (basic support)

  • git fmt-merge-msg - Produce merge commit message

  • git interpret-trailers - Add or parse structured information in commit messages

  • git mailinfo - Extract patch and authorship from single email message

  • git mailsplit - Simple UNIX mbox splitter

  • git merge-one-file - Standard helper program to use with git-merge-index

  • git patch-id - Compute unique ID for patch (API only, see patch module)

  • git stripspace - Remove unnecessary whitespace

  • git sh-setup - Common Git shell script setup code

  • git sh-i18n - Git’s i18n setup code for shell scripts

File Formats & Protocols

Repository Format

  • ✓ Object storage (loose objects)

  • ✓ Pack files (.pack)

  • ✓ Pack indexes (.idx)

  • ✓ Multi-pack index (.midx)

  • ✓ Pack bitmaps

  • ✓ Commit graphs

  • ✓ SHA-1 object format

  • ✓ SHA-256 object format

  • ✓ Reftable format

Configuration Files

  • ✓ .git/config

  • ✓ .gitignore

  • ✓ .gitattributes

  • ✓ .mailmap

  • ✓ .git/info/exclude

  • ✓ .git/info/attributes

  • ✓ .gitmodules

Ref Storage

  • ✓ Loose refs (refs/heads/, refs/tags/, etc.)

  • ✓ Packed refs (packed-refs)

  • ✓ Reflog

  • ✓ Reftable

Network Protocols

  • ✓ SSH protocol

  • ✓ Git protocol (git://)

  • ✓ HTTP/HTTPS (smart protocol)

  • ✓ HTTP/HTTPS (dumb protocol)

  • ✓ File protocol (file://)

  • ✓ Local repositories

  • ◐ Protocol v2 (client fully supported, server limited)

Transfer Capabilities

Fetch/Upload-Pack:

  • ✓ thin-pack - Server: ✓, Client: ✓

  • ✓ ofs-delta - Server: ✓, Client: ✓

  • ✓ multi_ack - Server: ✓, Client: ✓

  • ✓ multi_ack_detailed - Server: ✓, Client: ✓

  • ✓ side-band-64k - Server: ✓, Client: ✓

  • ✓ shallow - Server: ✓, Client: ✓

  • ✓ deepen-since - Server: ✓, Client: ✓

  • ✓ deepen-not - Server: ✓, Client: ✓

  • ✓ deepen-relative - Server: ✓, Client: ✓

  • ✓ include-tag - Server: ✓, Client: ✓

  • ◐ no-progress - Server: ✓, Client: ✗

  • ✓ symref - Server: ✓, Client: ✓

  • ◐ filter - Server: ✓, Client: ◐ (basic support)

Push/Receive-Pack:

  • ✓ report-status - Server: ✓, Client: ✓

  • ✓ delete-refs - Server: ✓, Client: ✓

  • ✓ quiet - Server: ✓, Client: ✓

  • ✓ atomic - Server: ✓, Client: ✓

  • ✓ ofs-delta - Server: ✓, Client: ✓

  • ✓ push-options - Server: ✓, Client: ✓

  • ✓ side-band-64k - Server: ✓, Client: ✓

General:

  • ✓ object-format - Server: ✓, Client: ✓

  • ✓ agent - Server: ✓, Client: ✓

Protocol v2 Specific:

  • ✓ ls-refs - Server: ✗, Client: ✓

  • ✓ packfile-uris - Server: ✗, Client: ✓

  • ✓ bundle-uri - Server: ✗, Client: ✓

Advanced Features

Signatures

  • ✓ GPG commit signing

  • ✓ GPG tag signing

  • ✓ GPG signature verification (verify-commit, verify-tag)

  • ✓ SSH commit signing

  • ✓ SSH tag signing

  • ✓ SSH signature verification

  • ✓ X509 commit signing

  • ✓ X509 tag signing

  • ✓ X509 signature verification

Filters & Attributes

  • ✓ Clean/smudge filters

  • ✓ Text/binary detection

  • ✓ End-of-line conversion (CRLF/LF)

  • ✓ .gitattributes processing

  • ✗ Working tree encoding

  • ✓ Whitespace handling

Hooks

  • ✓ Hook execution

  • ✓ pre-commit

  • ✗ prepare-commit-msg

  • ✓ commit-msg

  • ✓ post-commit

  • ✗ pre-rebase

  • ✗ post-checkout

  • ✗ post-merge

  • ✗ pre-push

  • ✓ pre-receive

  • ✓ update

  • ✓ post-receive

  • ✗ post-update

  • ✗ push-to-checkout

Git LFS

  • ✓ git-lfs init

  • ✓ git-lfs track

  • ✓ git-lfs untrack

  • ✓ git-lfs ls-files

  • ✓ git-lfs fetch

  • ✓ git-lfs pull

  • ✓ git-lfs push

  • ✗ git-lfs checkout

  • ✓ git-lfs clean (filter)

  • ✓ git-lfs smudge (filter)

  • ✓ git-lfs pointer - Check LFS pointers

  • ✓ git-lfs migrate

  • ✓ git-lfs status

  • ✓ LFS server implementation

  • ✓ LFS batch API

Sparse Checkout

  • ✓ Sparse checkout patterns

  • ✓ Cone mode

  • ✓ git sparse-checkout init - Cone mode

  • ✓ git sparse-checkout set - Cone mode

  • ✓ git sparse-checkout add - Cone mode

  • ✓ git sparse-checkout list - List current patterns

  • ✓ git sparse-checkout disable - Disable sparse checkout

  • ✗ git sparse-checkout reapply

Worktrees

  • ✓ git worktree add

  • ✓ git worktree list

  • ✓ git worktree remove

  • ✓ git worktree prune

  • ✓ git worktree lock

  • ✓ git worktree unlock

  • ✓ git worktree move

  • ✓ git worktree repair

Submodules

  • ✓ git submodule add

  • ✓ git submodule init

  • ✓ git submodule update

  • ◐ git submodule status (basic)

  • ✗ git submodule summary

  • ✗ git submodule foreach

  • ✗ git submodule sync

  • ✗ git submodule deinit

  • ✗ git submodule absorbgitdirs

Subtree

  • ✓ git subtree add

  • ✓ git subtree merge

  • ✓ git subtree pull

  • ✓ git subtree push

  • ✓ git subtree split

Notes

  • ✓ git notes add

  • ✓ git notes list

  • ✓ git notes show

  • ✓ git notes remove

  • ✗ git notes append

  • ✗ git notes copy

  • ✗ git notes merge

  • ✗ git notes prune

  • ✗ git notes get-ref

Other Advanced Features

  • ✓ Rerere (reuse recorded resolution)

  • ✓ Commit graph

  • ✓ Replace objects

  • ✓ Grafts

  • ✓ Info/alternates (alternate object databases)

  • ✓ Partial clone/fetch

  • ✓ Shallow clone/fetch

  • ✓ Bundle files (create, read, write, verify)

  • ✓ Bundle URI support (for faster clones and fetches)

  • ✓ Fast-import/fast-export

  • ✗ Scalar

  • ◐ Partial clone with object filters (basic blob:none support)

Web Interface

  • ✓ Gitweb-like interface (dulwich.web)

  • ✓ WSGI application support

  • ✗ cgit

  • ✗ GitWeb (Perl implementation)

Configuration Options

Core (core.*)

  • core.autocrlf - Automatic CRLF line ending conversion

  • core.bare - Bare repository flag

  • core.commentChar - Comment character for commit messages

  • core.commitGraph - Enable commit graph

  • core.compression - Object compression level

  • core.deltaBaseCacheLimit - Memory limit for delta base cache

  • core.editor - Default editor

  • core.eol - Line ending style

  • core.excludesFile - Global gitignore file

  • core.filemode - Honor executable bit

  • core.fsyncObjectFiles - Fsync object files to disk

  • core.gitProxy - Proxy command for git:// connections

  • core.ignorecase - Case-insensitive filename matching

  • core.looseCompression - Compression level for loose objects

  • core.maxStat - Limit stat operations

  • core.multiPackIndex - Enable multi-pack index

  • core.packedGitLimit - Memory limit for mmapped pack files

  • core.pager - Pager program

  • core.precomposeunicode - NFD to NFC Unicode normalization (macOS)

  • core.preloadIndex - Preload index for performance

  • core.protectHFS - Protect against HFS+ vulnerabilities

  • core.protectNTFS - Protect against NTFS vulnerabilities

  • core.repositoryformatversion - Repository format version

  • core.safecrlf - Safe CRLF checks

  • core.sharedRepository - Shared repository permissions

  • core.sparseCheckoutCone - Sparse checkout cone mode

  • core.sshCommand - SSH command override

  • core.symlinks - Create symlinks

  • core.trustctime - Trust ctime in index

  • core.abbrev - Abbreviate object names

  • core.fsmonitor - File system monitor daemon

  • core.hooksPath - Custom hooks location

  • core.quotePath - Quoting of paths with special characters

  • core.splitIndex - Enable split index

  • core.untrackedCache - Enable untracked file cache

  • core.whitespace - Whitespace error highlighting

  • core.worktree - Working directory path override

User (user.*)

  • user.email - User email address

  • user.name - User name

  • user.signingkey - GPG/SSH signing key

Branch (branch.*)

  • branch.autoSetupMerge - Auto setup merge tracking

  • branch.sort - Branch sorting

  • branch.<name>.merge - Tracking branch merge ref

  • branch.<name>.remote - Tracking branch remote

  • branch.<name>.pushRemote - Remote to push to

  • branch.<name>.rebase - Rebase when pulling this branch

  • branch.<name>.description - Branch description

Remote (remote.*)

  • remote.<name>.url - Remote URL

  • remote.<name>.pushInsteadOf - Push URL rewriting

HTTP (http.*)

  • http.extraHeader - Extra HTTP headers (supports per-URL)

  • http.proxy - HTTP proxy server

  • http.proxyAuthMethod - HTTP proxy auth method

  • http.sslCAInfo - SSL CA certificate file

  • http.sslVerify - Verify SSL certificates

  • http.timeout - HTTP timeout

  • http.userAgent - User-Agent header (supports per-URL)

  • http.cookieFile - Cookie jar file

  • http.lowSpeedLimit - Abort if speed falls below limit

  • http.lowSpeedTime - Time for low speed detection

  • http.postBuffer - Max HTTP POST buffer size

  • http.sslBackend - SSL backend

  • http.sslVersion - SSL version

  • http.version - HTTP protocol version

Pack (pack.*)

  • pack.bigFileThreshold - Large file threshold

  • pack.deltaCacheSize - Delta cache size

  • pack.deltaWindowSize - Delta window size

  • pack.depth - Pack depth

  • pack.indexVersion - Pack index version

  • pack.threads - Number of pack threads

  • pack.windowMemory - Window memory limit

  • pack.writeBitmaps - Write bitmap indexes

  • pack.writeBitmapHashCache - Write bitmap hash cache

  • pack.writeBitmapLookupTable - Write bitmap lookup table

GC (gc.*)

  • gc.auto - Auto garbage collection

  • gc.autoPackLimit - Auto pack limit

  • gc.logExpiry - Log expiry period

  • gc.pruneExpire - Unreachable object prune grace period

GPG/Signing (gpg.*)

  • commit.gpgSign - Sign commits by default

  • gpg.format - Signature format (openpgp, x509, ssh)

  • gpg.minTrustLevel - Minimum GPG trust level

  • gpg.program - GPG program path

  • gpg.ssh.allowedSignersFile - SSH allowed signers file

  • gpg.ssh.defaultKeyCommand - SSH default key command

  • gpg.ssh.program - SSH signing program

  • gpg.ssh.revocationFile - SSH revocation file

  • gpg.x509.program - X.509 signing program

  • tag.gpgSign - Sign tags by default

Extensions (extensions.*)

  • extensions.objectformat - Object format (SHA-1/SHA-256)

  • extensions.relativeworktrees - Relative worktree paths

  • extensions.worktreeconfig - Worktree-specific config

Diff/Merge/Status

  • merge.<name>.driver - Merge driver command

  • diff.algorithm - Diff algorithm (patience, histogram, etc.)

  • diff.context - Default context lines

  • diff.external - External diff tool

  • diff.noprefix - Omit a/b prefixes

  • diff.submodule - Submodule diff format

  • merge.conflictStyle - Conflict marker style (merge, diff3, zdiff3)

  • merge.tool - Default merge tool

  • status.showUntrackedFiles - Show untracked files

Pull/Push/Fetch/Rebase

  • fetch.fsckObjects - Validate object integrity on fetch

  • fetch.prune - Auto-prune deleted remote branches

  • fetch.pruneTags - Auto-prune deleted remote tags

  • pull.ff - Fast-forward only on pull

  • pull.rebase - Rebase instead of merge on pull

  • push.default - Default push strategy

  • push.followTags - Push annotated tags

  • rebase.autoStash - Auto-stash before rebase

  • transfer.fsckObjects - Validate object integrity on transfer

Credentials

  • ✓ Credential store file support (~/.git-credentials)

  • credential.helper - Credential helper programs

  • credential.useHttpPath - Include path in credential lookup

Other

  • clean.requireForce - Require force for clean

  • feature.manyFiles - Many files optimization

  • filter.<name>.clean - Clean filter command

  • filter.<name>.process - Long-running process filter

  • filter.<name>.required - Filter required flag

  • filter.<name>.smudge - Smudge filter command

  • i18n.commitEncoding - Commit message encoding

  • index.skipHash - Skip hash in index

  • index.version - Index version

  • init.defaultBranch - Default branch name

  • lfs.url - LFS server URL

  • maintenance.<task>.enabled - Task enabled flag

  • maintenance.<task>.schedule - Task schedule

  • maintenance.repo - Maintenance repository

  • maintenance.strategy - Maintenance strategy

  • notes.displayRef - Notes display reference

  • rerere.autoupdate - Auto update rerere

  • rerere.enabled - Enable rerere

  • sequence.editor - Sequence editor (for interactive rebase)

  • url.<base>.insteadOf - URL rewriting

  • url.<base>.pushInsteadOf - Push URL rewriting

  • advice.* - Advice/hint messages

  • alias.* - Command aliases

  • color.* - Colorization settings

  • commit.cleanup - Commit message cleanup mode

  • commit.template - Commit message template file

  • format.pretty - Default pretty-print format

  • log.abbrevCommit - Abbreviate commits in log

  • receive.fsckObjects - Validate received objects

  • tag.sort - Default tag sorting

Known Limitations

The following Git features are not currently supported:

  • Git GUIs (gitk, git-gui, git-citool)

  • Email workflow tools (git-send-email, git-request-pull)

  • Interactive tools (git-difftool, git-mergetool)

  • Newer features (range-diff, scalar, fsmonitor–daemon)

  • Full protocol v2 server support (client is fully supported)

  • Some plumbing commands (mktree, http-push, upload-archive, fmt-merge-msg, merge-one-file)

  • Full submodule feature parity (basic operations supported)

  • Some advanced object filtering options (basic filters supported)

  • Most git hooks (only pre-commit, commit-msg, post-commit, pre-receive, update, post-receive supported)

  • Working tree encoding attribute

Compatibility Notes

Repository Compatibility

Dulwich maintains full wire-format and on-disk repository format compatibility with C Git. This means:

  • Dulwich can read and write repositories created by C Git

  • C Git can read and write repositories created by Dulwich

  • Dulwich and C Git can be used interchangeably on the same repository

  • Network protocols are fully compatible

See Also

  • tutorial-index - Tutorial for using Dulwich

  • Git Server Protocol - Git protocol documentation

  • dulwich.porcelain - High-level API reference