A custom implementation of the core Git version control system (orb) written in Go, and a web interface clone inspired by GitHub (orbhub) built with Next.js.
This project is primarily an ambitious learning exercise aimed at deeply understanding:
- Git Internals: How version control systems like Git work under the hood (objects, DAGs, index, refs, protocols).
orb(Go CLI):- Goal: To replicate core Git functionalities from the command line.
- Implementation: Written purely in Go.
- Focus: Understanding and implementing the Git object model (blobs, trees, commits), content-addressable storage, the index (staging area), refs (branches, HEAD), and eventually networking protocols (HTTP Smart Protocol).
-
orb init: Initialize a new.orbrepository. -
orb hash-object: Create blob objects from files. -
orb add: Stage file changes (update the index). -
orb write-tree: Create a tree object from the index. -
orb commit-tree: Create a commit object. -
orb commit: Create a commit (combiningwrite-tree,commit-tree, and updating refs). -
orb log: View commit history. -
orb status: Show working directory and staging area status.
- Branching (
orb branch,orb checkout) - Merging
- Diffing (
orb diff) - Networking (
orb clone,orb fetch,orb pull,orb push) via HTTP Smart Protocol - Networking via SSH Protocol
- Garbage collection / Packing
orb:- Language: Go
- Core Libraries: Go Standard Library (
os,crypto/sha1orsha256,compress/zlib,net/http, etc.) - CLI Framework:
cobra
- Understand the Git object model: blob, tree, commit, tag
- Learn how Git stores objects in
.git/objectsusing SHA-1 hashes - Understand how refs (branches, tags) and HEAD work
- Explore the index (staging area) and how it tracks changes
- Grasp the structure of the commit graph (DAG) and how Git traverses history
