π©Ή Patches β
A patch is a standalone file that captures a set of changes β independent of any branch or remote. At Tellia, we use them to move work across worktrees: you develop in one directory, export the changes as a patch, then apply and open a PR against main, staging, or production without needing to touch the original branch.
The patches/ folder at the repo root is the drop zone. It is gitignored β patches are transient, not shared.
Apply a patch β
bash
git apply patches/my-changes.patchThen open a PR as usual.
Create a patch β
bash
# From unstaged changes
git diff > patches/my-changes.patch
# From staged changes
git diff --cached > patches/my-changes.patch
# From a specific commit range
git diff main..HEAD > patches/my-changes.patchRelated β
- Pull requests β opening a PR once the patch is applied
- Backport β automated way to propagate a merged PR to another branch
- Git worktrees β the typical context where patches are useful