Mastering Stacked Diffs and Git Workflow
If you have ever felt paralyzed by a massive feature branch that has fallen weeks behind main, you know the pain of the traditional GitHub Flow. There is a better way: Stacked Diffs.
What is a Stacked Diff?
Instead of one giant branch for a feature, you break your work into a chain (or stack) of small, dependent branches.
main
└─ feature-part-1 (API changes)
└─ feature-part-2 (UI components)
└─ feature-part-3 (Integration)
You submit a Pull Request for feature-part-1. While it is being reviewed, you continue working on feature-part-2 based on feature-part-1. You do not stop. You do not context switch.
Why Stack?
- Faster Reviews: Reviewers only look at small, logical chunks of code.
- Unblocked Development: You never have to wait for a review to continue coding.
- Easy Reverts: If Part 2 has a bug, you can revert just that part without killing the whole feature.
Tooling Matters
Managing stacks manually with standard Git commands can be painful (git rebase --interactive hell). Tools like Graphite (and increasingly, native Git features) make this workflow seamless.
At MatterAI, we use stacked diffs for everything. It allows our small team to ship with the velocity of a team 10x our size.
Best Practices
- Keep stacks usually under 4-5 deep. Any deeper and managing dependencies becomes tricky.
- Merge from the bottom up. Once the bottom PR is approved and merged, rebase the rest of the stack on top of
main. - Communicate with reviewers. Let them know it is a stack so they understand the context of the changes.
MatterAI builds frontier AI infrastructure for engineering teams — from inference-optimized models to autonomous coding agents and agentic code reviews.
Explore what we're building:
- Orbital IDE — Autonomous AI coding agent with background agents and deep codebase memory
- AI Code Reviews — Agentic pre-commit reviews across GitHub, GitLab, and Bitbucket
- Axon Models — Frontier-grade reasoning models at 70% lower inference cost
Share this Guide:
More Guides
Local LLMs in Your IDE: Connecting Ollama to Coding Agents and Autocomplete
Wire local models into VS Code, JetBrains, Cline, Continue, and Aider via the OpenAI-compatible API. Covers model routing, context budgets, tool calling with small models, and when a local model is the right choice for the job.
15 min readBuilding a Self-Hosted AI Stack: Ollama, Open WebUI, and Local RAG
Stand up a fully self-hosted AI stack on a single machine: Ollama for inference, Open WebUI as the chat interface, local embeddings for RAG, and a reverse proxy for secure access. No cloud dependency, no data leaving your network.
17 min readTop 5 Open-Source Coding Models to Run on Your Mac (2026)
The best local coding models for Apple Silicon in 2026, ranked by quality per gigabyte of unified memory. Covers qwen3-coder, devstral, gpt-oss, and more with real pull tags, sizes, and context windows.
14 min readRunning LLMs Locally: GGUF, Quantization, and Memory Planning
Learn the GGUF format, the quantization ladder from Q2 to FP16, and the exact memory math for running models on Apple Silicon and NVIDIA GPUs. Includes Ollama and llama.cpp tuning for KV cache and context.
15 min readOllama vs vLLM vs llama.cpp: Choosing the Right Local LLM Runtime
Compare the three dominant local LLM runtimes on architecture, throughput, hardware, and deployment context. Includes benchmark data, a decision framework, and a migration path from Ollama to vLLM.
16 min readContinue Reading
Local LLMs in Your IDE: Connecting Ollama to Coding Agents and Autocomplete
Wire local models into VS Code, JetBrains, Cline, Continue, and Aider via the OpenAI-compatible API. Covers model routing, context budgets, tool calling with small models, and when a local model is the right choice for the job.
15 min readBuilding a Self-Hosted AI Stack: Ollama, Open WebUI, and Local RAG
Stand up a fully self-hosted AI stack on a single machine: Ollama for inference, Open WebUI as the chat interface, local embeddings for RAG, and a reverse proxy for secure access. No cloud dependency, no data leaving your network.
17 min readTop 5 Open-Source Coding Models to Run on Your Mac (2026)
The best local coding models for Apple Silicon in 2026, ranked by quality per gigabyte of unified memory. Covers qwen3-coder, devstral, gpt-oss, and more with real pull tags, sizes, and context windows.
14 min readShip Faster. Ship Safer.
Join thousands of engineering teams using MatterAI to autonomously build, review, and deploy code with enterprise-grade precision.
