Hello FOSS
Back to Projects
BeginnerIIT Guwahati

MiniGit

A small Git rebuilt from scratch in plain Python, with no dependencies, so you can see exactly how Git works inside, one command at a time.

Overview

MiniGit is an open-source reimplementation of Git's core in plain Python, written to be read and learned from. It rebuilds the pieces developers use every day without seeing: the content-addressed object store, SHA-1 hashing, blobs, trees, commits, branches, HEAD and the staging area. It's not a toy format. MiniGit writes real Git objects, so the real git can read a MiniGit repository (for example, GIT_DIR=.minigit git log shows commits made with MiniGit). A compatibility test suite checks this against real Git.

init, hash-object, cat-file, add and commit already work. Many familiar commands are still open for contributors to build, including log, status, branch, checkout, diff, tag, rm, reset and merge, along with plumbing like write-tree, commit-tree, update-ref, symbolic-ref and show-ref, and features like packed-refs, gc, grep and archive. Each Git command is a small, self-contained Python file in src/minigit/commands/, and the CLI finds new commands automatically. That makes the project friendly to first-time open-source contributors: you can add a command without touching the rest of the codebase, and you learn how Git really works while you do it. A 15-minute "adding a command" tutorial and an architecture guide take you from your first clone to your first PR. Issues are labelled by difficulty (good first issue, beginner, intermediate). There's also tooling and docs work, such as test coverage, mypy in CI, shell completion, a docs website and automated releases. CI runs ruff and pytest on Linux, macOS and Windows across Python 3.10 to 3.13.

Contributing

Explore the repository to understand the codebase, then browse open issues to find one that matches your skills. Submit a pull request following the project's contribution guidelines, and a mentor will review it and work with you until it's ready to merge.

Recent Activity