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

推荐订阅源

V
Visual Studio Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
Netflix TechBlog - Medium
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
V
V2EX
IT之家
IT之家
J
Java Code Geeks
Hacker News - Newest:
Hacker News - Newest: "LLM"
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
GbyAI
GbyAI
D
Docker
S
Secure Thoughts
Recent Announcements
Recent Announcements
Webroot Blog
Webroot Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
云风的 BLOG
云风的 BLOG
博客园_首页
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Security Archives - TechRepublic
Security Archives - TechRepublic
酷 壳 – CoolShell
酷 壳 – CoolShell
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
N
News | PayPal Newsroom
S
Security @ Cisco Blogs
I
InfoQ
Last Week in AI
Last Week in AI
SecWiki News
SecWiki News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
W
WeLiveSecurity
T
Troy Hunt's Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Attack and Defense Labs
Attack and Defense Labs
美团技术团队
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
Martin Fowler
Martin Fowler
B
Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Scott Helme
Scott Helme
T
Tor Project blog
Know Your Adversary
Know Your Adversary
有赞技术团队
有赞技术团队
Hugging Face - Blog
Hugging Face - Blog
Recorded Future
Recorded Future
C
Cyber Attacks, Cyber Crime and Cyber Security
AI
AI
G
Google Developers Blog

Graphite blog

Introducing Code Tours: a new way to review Introducing Cursor Cloud Agents in Graphite Building the future of software development with Cursor Reimagining the PR Page: Designing for speed and focus Graphite changelog [11-20-2025] Graphite changelog [11-04-2025] Graphite changelog [10-16-2025] The future of engineering is collaborative (and already here) Meet Graphite Agent: the next evolution of AI code review Introducing frozen branches: A safer way to build on your teammates’ work Graphite changelog [09-17-2025] How we sped up code search for Graphite Chat Introducing Graphite Chat AI is writing code—here's why it also needs to review that code How I got Claude to write code I could actually ship How we built the first stack-aware merge queue (and why it matters) How we organize our monorepo to ship fast Graphite brings stacking to Tower Code review tooling: Should you build or buy? Making AI code review available to everyone Introducing: The new Graphite + Linear integration Graphite raises $52M and launches Diamond to reimagine code review for the age of AI Why AI will never replace human code review How stacked PRs unblock distributed development teams Graphite is going to Developer Week 2025 Beating the end of year code freeze How Graphite’s eng team ships code remarkably fast Why we chose Anthropic's Claude to power Graphite Reviewer AI code generation will remain fragmented How we redesigned Graphite's landing page in-house Introducing Graphite Reviewer: your AI code review companion How AI code review reduces review cycles to improve developer productivity What if you could get instant feedback on your code? The new developer toolchain Not Rocket Science - How Bors and Google’s TAP inspired modern merge queues Graphite's State of code review 2024 How Google migrated billions of lines of code from Perforce to Piper Going from 0 to 1: How to write better unit tests when there are none Speed up your merges: Parallel CI is now generally available for teams using Graphite’s merge queue Down for less than four minutes a month: how AWS deploys code BitKeeper, Linux, and licensing disputes: How Linus wrote Git in 14 days Graphite is now free for startups and open source projects Launch week wrap-up (May 2024) Reduce CI costs for Buildkite and GitHub Actions Cheaper CI & faster merging with batching How Google does code review The technical learning curve at a startup is gentler than you might think Graphite will now automatically rebase your partially-merged stacks Multiple engineers can now seamlessly collaborate on the same stack of PRs Do you ever outgrow GitHub? From the 80's to 2024 - how CI tests were invented and optimized Graphite changelog [4/10/2024] 🎺 Graphite changelog [4/25/2024] 🐸 How Stack Overflow replaced Experts Exchange How GitHub monopolized code hosting Graphite changelog [3/27/2024] 🤝 The core principles of building a good AI feature Onboarding roulette: deleting our employee accounts daily Graphite changelog [3/13/2024] 🚁 Why Facebook doesn’t use Git How to recreate the Phabricator code review workflow Types of code reviews: Improve performance, velocity, and quality What's the best GitHub pull request merge strategy? Phabricator vs GitHub vs Graphite: How do they stack up? Improving team velocity through better pull request practices Moving fast breaks things: the importance of a staging environment Building trust as a software engineer Keeping code simple: moving fast by avoiding over-engineering What's better than GitHub pull request filters? The Graphite pull request inbox 7 Best Phabricator alternatives for PR stacking + code review [2024] Accurate eng estimations: predicting and negotiating the future Tracking and understanding GitHub PR stats: A step-by-step guide 8 pull request best practices for optimal engineering What’s next for Graphite Graphite Q1 Launch week: Stacking with the tools you love Graphite Q1 Launch week: Making stacking seamless Accelerating code review The Mom Test How to use stacked PRs to unblock your entire team Graphite Q1 launch week 2024 The practical and philosophical problems with AI code review Empirically sup code review best practices Call site attribution: how to pinpoint rogue SQL queries throttling your performance Every engineer should understand git reflog Post mortem: we took 124 seconds from you, here's 378 back Your GitHub pull request workflow is slowing everyone down Optimizing CI/CD workflows for trunk-based development Why we use AWS instead of Vercel to host our Next.js app How large pull requests slow down development 3 key lessons in application server optimization Git was built in 5 days Why large companies and fast-moving startups are banning merge commits How long should your CI take? Experimenting with AI code review CRA to AppRouter in 5 Steps: A case study with Graphite Graphite Changelog [10/18/2023] The comprehensive guide to writing the best PR title of all time How 10,000 Developers All Contribute to the same Repo
Trunk-based development: why you should stop using feature branches
Greg Foster · 2023-11-14 · via Graphite blog

Cursor Cloud Agents are now in Graphite. Create, review, and ship without leaving your PR.

author

Greg Foster

Nov 13, 2023

Having worked at companies ranging from tiny startups, to massive organizations like Google and Airbnb in my career so far, I’ve seen wave-after-wave of developer workflows quickly rise and fall in popularity. One of them, however, has stood the test of time and demonstrated value across eng orgs of all sizes: trunk-based development.

What is trunk-based development?

Trunk-based development (TBD) is a workflow where all developers work off of a single, shared main branch (the "trunk") and integrate their changes frequently. Keeping all dev branches based on trunk and short-lived greatly streamlines the merge process, as conflicts are far less common. To further illustrate the merits of TBD, let's compare it to its closest predecessor, the feature branch workflow.

Trunk-based development vs. feature branches

Feature branching traces its roots back to the days of the Waterfall Model of software development, when changes were large, structured, and implemented in stages. Feature branches are like isolated playgrounds where developers can freely work on their specific features, independent of the work done by others. They can live independent of other changes for weeks or months at a time. The downside, however, is that unless you have an extremely specific use case (i.e. some mobile app development, where release speed is heavily gated by the app stores), feature branch development introduces too much siloing in your codebase. By design, feature branches are isolated from each other and long-lived, thus isolating the individual engineers working on them. Not only does this discourage collaboration within the eng team, it also all-but-ensures merge conflicts when different engineers try to merge in their long-running branches to deliver their projects.

For organizations that have bought into continuous integration/continuous delivery (CI/CD) and want to develop quickly, TBD is quickly becoming considered a best practice for the following reasons:

  1. Team synchronization: In TBD, developers base all of their changes on the trunk branch and integrate them more frequently, promoting a better team culture by keeping everyone informed about each other’s work.

  2. Fewer merge conflicts: TBD encourages regular commits and merges, thereby reducing the risk of serious merge conflicts that can arise when branches diverge extensively in a feature-branch workflow.

  3. Simplified continuous integration (CI): Regular commits to trunk imply that the codebase is always current, paving the way for a more efficient integration with CI.

  4. Optimized continuous delivery (CD): TBD necessitates maintaining the trunk in a deployable state, which aligns neatly with CD.

  5. Faster feedback loops: TBD minimizes the interval between writing and deploying code to production, meaning faster feedback from users.

  6. Promotes better practices: TBD encourages other best practices, like feature toggling and regular refactoring.

Industry leaders like Google and Facebook have long recognized these advantages, using TBD in their development for years. In fact, according to a 2021 Google Cloud report, “elite performers who meet their reliability targets are 2.3 times more likely to use trunk-based development. Low performers are more likely to use long-lived branches and to delay merging.”

Does Trunk-based development lead to higher velocity?

Based on millions of PRs synced with Graphite, trunk-based development can yield concrete speed improvements. PRs based on trunk branches see a nearly 10-hour reduction in PR open-to-merge time compared to PRs with other merge bases.

Much like we saw with banning merge commits, our data suggests that larger, higher-performing organizations are more likely to have implemented trunk-based development:

Lastly, we can see that this trend has only been increasing over the last decade, culminating in almost 80% of PRs merged in 2023 being based on “main” or “master” rather than a feature branch. Excluding stacked pull requests, we expect this trend to continue increasing in the coming years.

Say “no” to feature branches

The advantages Trunk Based Development offers in terms of CI/CD, reduced merge conflicts, and fast feedback loops make it a far better choice than long-lived feature branches for organizations aiming for high-velocity, high-quality software development. Adopting TBD may involve a shift in mindset and operational habits if you’re used to older development practices, but the benefits it brings are well worth the effort.

Try it out, look at your own stats, and let me know what you think!

Related articles