dgit logo

dgit

Git forge on Durable Objects

Developer ToolsTypeScriptMIT 168 8
Website GitHub

What is it?

What it is

dgit is a git server implemented in TypeScript for Cloudflare Workers and self-hosted environments using celld. Each repository is a Durable Object with a private SQLite database that stores git objects and refs, speaks the git smart HTTP protocol, and renders a cgit-style web interface.

Why it exists

dgit provides a durable, scalable git server solution that costs almost nothing for inactive repositories, prevents noisy neighbor problems through per-repository isolation, and offers both Cloudflare Workers deployment and self-hosting capabilities with optional R2 storage for packfiles and clone caching.

Who should use it

Developers building custom git servers, teams using Cloudflare Workers, and anyone requiring a private, self-hosted git backend with high scalability

Who should avoid it

Beginners new to git concepts, users requiring simple file sync solutions, and organizations relying on managed hosting services like GitHub or GitLab

Stars over time

No change stars in the last 1 day

168168
Aug 20, 2026Aug 20, 2026

How it works

A quick walkthrough in plain English

How dgit works

Step 1 of 3

You interact with it

Open dgit, send a request, or connect it to your stack.

Features

Durable Object-based git server for Cloudflare Workers
Private SQLite database per repository
Git smart HTTP protocol implementation
cgit-style web interface with syntax highlighting
R2 bucket integration for pack storage offload
Shallow clone support with --depth and --unshallow
Thin pack support
Side-band progress reporting
Forced updates and ref deletion handling
Built-in garbage collection via Durable Object alarms
JSON content API
Typed RPC interface
Custom authorization hooks
Push event webhooks
SHA-1 collision detection (SHA1DC=1)
Repository configuration management
Atom feeds
Commit activity statistics
Tar.gz and zip snapshot generation
Format-patch output compatible with git am
Blame and arbitrary-range diff views
Per-path history browsing
Repository description and section metadata
Private repository flag with token-based access control
GitHub-style owner/name namespace routing
Headless mode for custom frontends
CORS support for API access

Advantages

  • Scales automatically with per-repository isolation
  • No single origin server bottleneck
  • Low cost for inactive repositories
  • Native Cloudflare Workers integration
  • Preserves client-side compression in packfiles
  • Incremental fetch optimization
  • Self-hostable on celld for custom infrastructure
  • TypeScript library distribution
  • Flexible authorization system
  • Built-in web interface eliminates need for external tools

Disadvantages

  • Limited by 128MB memory and 5-minute CPU bounds on Workers
  • Large history pushes require multiple smaller operations
  • Full clone of repositories with millions of objects may exceed CPU limits
  • Pull requests disabled - contributions via email only
  • Requires Cloudflare account or self-hosted celld setup
  • Additional R2 bucket configuration needed for optimal performance
  • Complexity in managing multiple Durable Objects

Installation

cloud

npm install
npx wrangler r2 bucket create dgit-pack-cache   # optional: R2 pack offload + clone cache
npx wrangler deploy
npx wrangler secret put GIT_TOKEN   # the push password

native

Set a real GIT_TOKEN var in wrangler.celld.jsonc first:

```sh
celld deploy wrangler.celld.jsonc --bucket s3://my-cells --endpoint https://...
CELLD_V8_HEAP_LIMIT_MB=4096 CELLD_LTX_DURABILITY_TIMEOUT_SECS=180 \
celld --bucket s3://my-cells --endpoint https://... \
  --listen 0.0.0.0:8080 --internal-listen 10.0.0.1:8081 --advertise 10.0.0.1:8081
```

FAQ

What is dgit?

dgit is an open-source project licensed under MIT.

What language is dgit built with?

Primary language: TypeScript.

Is it free to use?

Yes. Licensed under MIT. Check the license for commercial use.

Loading documentation…
View on GitHub

Featured in Videos

YouTube tutorials and walkthroughs for dgit

Alternatives

Similar projects ranked by category, topics, and text overlap.

Compare