惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

人人都是产品经理
人人都是产品经理
宝玉的分享
宝玉的分享
小众软件
小众软件
有赞技术团队
有赞技术团队
月光博客
月光博客
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
MyScale Blog
MyScale Blog
Engineering at Meta
Engineering at Meta
Stack Overflow Blog
Stack Overflow Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
Netflix TechBlog - Medium
D
Docker
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
MongoDB | Blog
MongoDB | Blog
WordPress大学
WordPress大学
J
Java Code Geeks
罗磊的独立博客
V
Visual Studio Blog
雷峰网
雷峰网
H
Help Net Security
T
The Blog of Author Tim Ferriss
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
F
Fortinet All Blogs

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Organise Before You Stage: Changelists for Git
BHFock · 2026-05-17 · via DEV Community

Real development is rarely linear. You're mid-feature when you spot a typo in the README, or a stray debug statement left over from last week. Before long your working directory is a pile of loosely related edits, and the staging area gives you exactly one place to put them.

I ran into this problem when my team migrated from Subversion to Git. SVN had changelists: named groups of files you could organise before committing. I had changelists like ready_to_commit and do_not_commit, and the clarity they gave me was something I immediately missed in Git.

So I built git-cl, a Git subcommand that adds changelists to your workflow.

What's a changelist, exactly?

Think of changelists as sticky notes for your working directory. You group modified files under a name before deciding what to stage or commit. Nothing is staged until you say so, and you can have as many changelists as you like, all at once.

git-cl demo: creating changelists, viewing status, and branching

Changelists sit between your working directory and Git's staging area. They don't touch Git's index or history until you explicitly stage or commit. They're stored locally in .git/cl.json, private to your workspace and never committed.

Install with:

pip install git-changelists

Enter fullscreen mode Exit fullscreen mode

Workflow 1: Named staging areas

Git gives you one staging area. Everything you git add lands there together, waiting for a single commit. That works fine when your changes all belong together, but less well when you're mid-feature and notice something unrelated that needs fixing.

Say you're implementing a feature and notice a typo in the README along the way:

git cl add feature src/core.py src/helpers.py tests/test_core.py
git cl add typo-fix README.md

Enter fullscreen mode Exit fullscreen mode

git cl status shows you what's grouped where:

feature:
  [ M] src/core.py
  [ M] src/helpers.py
  [ M] tests/test_core.py

typo-fix:
  [ M] README.md

Enter fullscreen mode Exit fullscreen mode

All of it lives in your working directory at once. You can run tests, keep editing, see the full picture. When you're ready, commit one changelist at a time:

git cl commit feature -m "Implement core feature"
git cl commit typo-fix -m "Fix typo in README"

Enter fullscreen mode Exit fullscreen mode

Two focused commits, clean history, without ever touching a branch or juggling the staging area manually.

Workflow 2: Changelists as review stages

Here's where it gets more interesting. Changelists don't have to represent what you changed; they can represent where each file is in your review process.

Instead of grouping by feature, you group by stage. Start by putting all modified files into an initial changelist:

git cl add to_review src/core.py src/utils.py tests/test_core.py

Enter fullscreen mode Exit fullscreen mode

Run your linter. Files that pass move forward:

git cl add linted src/core.py

Enter fullscreen mode Exit fullscreen mode

Moving a file to a new changelist removes it from the old one automatically. git cl status becomes a dashboard of your review pipeline:

to_review:
  [ M] src/utils.py

linted:
  [ M] tests/test_core.py

ready:
  [ M] src/core.py

Enter fullscreen mode Exit fullscreen mode

You decide what the stages mean: numbered (review_1, review_2), named after what's been checked (linted, tested, profiled), or named after approvals (self_review_ok, ai_review_ok, ready_to_commit). The pattern is the same: changelists as a lightweight state machine, with git cl status as the dashboard.

Workflow 3: Late-binding branching

Branches are Git's model for isolating parallel work, but they ask you to decide upfront. In practice, you often don't know something needs its own branch until you're already deep into it.

git cl branch lets you defer that decision. Say you've been improving a numerical solver alongside other unrelated work:

git cl add solver-opt src/solver.f90 src/utils_math.f90
git cl add config-fix config.yaml

Enter fullscreen mode Exit fullscreen mode

At some point the solver work has grown beyond the scope of your current branch. Rather than committing half-finished work, you promote it:

git cl branch solver-opt

Enter fullscreen mode Exit fullscreen mode

git-cl stashes all active changelists, creates and checks out a new branch named solver-opt, then restores only the solver-opt changelist. Your other changelists stay stashed and can be recovered with git cl unstash.

The result: you're on a dedicated feature branch with your changelist intact, ready to pick up exactly where you left off. The branch decision followed the code, not the other way around.

Quick start

pip install git-changelists

# Inside any Git repo:
git cl add my-feature file1.py file2.py
git cl status
git cl commit my-feature -m "Add feature"

Enter fullscreen mode Exit fullscreen mode

Full documentation and a step-by-step tutorial are at github.com/BHFock/git-cl.

Changelists aren't a replacement for branches. They're a layer that sits before them, a way to organise intent while work is still in motion. If your working directory often feels like a pile of loosely related edits, they might be worth a try.