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

推荐订阅源

H
Help Net Security
Scott Helme
Scott Helme
爱范儿
爱范儿
WordPress大学
WordPress大学
博客园 - 三生石上(FineUI控件)
阮一峰的网络日志
阮一峰的网络日志
博客园 - Franky
V
V2EX
腾讯CDC
博客园_首页
博客园 - 司徒正美
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tailwind CSS Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
小众软件
小众软件
J
Java Code Geeks
大猫的无限游戏
大猫的无限游戏
月光博客
月光博客
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog
雷峰网
雷峰网
Stack Overflow Blog
Stack Overflow Blog
IT之家
IT之家
罗磊的独立博客
Recorded Future
Recorded Future
博客园 - 聂微东
O
OpenAI News
S
Secure Thoughts
Hacker News: Ask HN
Hacker News: Ask HN
S
Schneier on Security
Hacker News - Newest:
Hacker News - Newest: "LLM"
Y
Y Combinator Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Project Zero
Project Zero
宝玉的分享
宝玉的分享
K
Kaspersky official blog
N
Netflix TechBlog - Medium
T
The Exploit Database - CXSecurity.com
Google Online Security Blog
Google Online Security Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Webroot Blog
Webroot Blog
云风的 BLOG
云风的 BLOG
Simon Willison's Weblog
Simon Willison's Weblog
C
Check Point Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
L
LINUX DO - 热门话题
美团技术团队
L
Lohrmann on Cybersecurity

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 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 Trunk-based development: why you should stop using feature branches 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
8 pull request best practices for optimal engineering
Ninad Pathak · 2024-01-20 · via Graphite blog

Most modern software development  workflows rely heavily on pull requests—a mechanism for proposing, discussing, and reviewing code changes before they are merged into the main codebase.

While pull requests encourage teamwork, doing them well requires thoughtfulness and care. If developers rush to ship new features, it can become easy to cut corners on pull requests—leading to piles of tech debt that eventually halt or slow down the development process.

It's simple: teams that handle pull requests well, ship new features faster, and have happier engineers. Handling PRs poorly has the exact opposite effect. 

Let’s understand some pull request best practices you can introduce to your team and how they can benefit authors, code reviewers, and the overall workflow.

Before jumping into the pull request best practices, let’s understand why traditional PR practices fail.

Why traditional PR practices fail

Even with good intentions, traditional pull request workflows often fall short in a few key areas:

Feature creep: Pull requests become overloaded with multiple changes, spanning different contexts, making it difficult to understand the scope and review each change effectively. 

For example, let's say a developer bundles a new recommendation algorithm, visual redesigns of the home page, and a migration to a microservices architecture into one massive PR spanning over hundreds of files. Because the change is so large, reviewers then struggle to test and validate each component which  delays the merge, and prevents the author from continuing development.

“Feature creep is an innocent process. An engineer looking at a prototype of a remote control might think to herself, “Hey, there’s some extra real estate here on the face of the control. And there’s some extra capacity on the chip. Rather than let it go to waste, what if we give people the ability to toggle between the Julian and Gregorian calendars?” — Chip Heath & Dan Heath, Made to Stick: Why Some Ideas Survive and Others Die

Unintentional dependencies: Changes can inadvertently introduce dependencies on future features or seemingly unrelated functionalities, creating tangled code and hindering future development. This "domino effect" can significantly slow progress and increase maintenance complexity as discrete aspects of the codebase become interlinked.

Let’s return to our recommendation algo. Let’s say the PR also included some database query optimizations, which inadvertently caused the product search feature to slow down. The underlying indexes were adjusted, creating widespread slowdowns—these dependencies were not intended when the code was being written.

Knowledge silos: Code reviews should not neglect other considerations like performance, UX, and broader architectural implications. A pitfall of a bad code review process is when reviewers focus too narrowly on code quality and functionality, and neglect to consider the broader impact of the changes being proposed—likely due to a lack of knowledge in the domain.

For example, the PR described above included caching to improve performance. However, the reviewers did not consider how this might impact overall infrastructure costs and complexity. As a result, the code was approved, but it ended up having a negative impact on the system as a whole.

Good code reviews take a holistic approach, and consider all of the potential implications of the changes being proposed.

Context vacuum: Another pitfall is that pull request descriptions and commit messages often lack sufficient context, leaving reviewers guessing about the purpose and motivation behind the changes. 

For instance, to fix the above caching issue, a developer creates another PR titled "Fix bug" that modifies a core module without explaining the adjustments. However, the commit message is not descriptive enough for a reviewer to know what changes have been made—there is no context for the bug fix. 

The reviewer is then forced to either directly ask the author for more context, or go digging through the codebase themselves, searching for the reason behind the proposed changes. 

Big ideas developed in a vacuum are doomed from the start. Feedback is an essential tool for building and growing a successful company. — Jay Samit, Independent Vice Chairman, Deloitte Digital

Review bottlenecks: Large pull requests can lead to review fatigue, causing lengthy delays and impacting team productivity. Additionally, relying on a small pool of reviewers creates bottlenecks and hinders knowledge sharing within the larger team. 

For example, the recommendation algo PR may wait for weeks for the only person familiar with the parameters and weights of the algorithm. This dependency can make it difficult to get features rolled out faster, as the author is blocked on the review to merge the code and continue development.

These common pitfalls highlight the need for more conscious and proactive efforts to get the most out of your pull request process.

8 pull request best practices for a faster development process

Efficiency in code reviews isn't the only goal—teams must invest in nurturing collaboration and knowledge sharing. Let's explore some key practices engineering leaders can implement within their teams to speed up their PR workflows and minimize friction.

1. Write smaller pull requests

One of the most impactful pull request best practices is to keep them small and tightly scoped, with changes of less than 200 lines on a single PR, the ideal PR being <50 lines of code

On average, we’ve found that teams with PR sizes hovering around the 50-line average, ship 40% more code than a similar team doing 200+ line PRs. Smaller PRs also make it easier to write proper unit tests for each module, and make reverting regressions much easier.

"If somebody sends you a code review that is so large you’re not sure when you will be able to have time to review it, your typical response should be to ask the developer to split the CL into several smaller CLs that build on each other." — Speed of Code Reviews

Keeping PRs concise encourages reviewers to assess code changes quickly rather than become overwhelmed. It also promotes authoring commit messages that summarize modifications at an appropriately granular level, something that becomes harder when you’re trying to capture more context.

However, tight scoping can be challenging to implement when a team is used to a particular PR workflow. That’s where techniques like PR stacking can help.

2. Implement PR stacking

Stacked PRs partition big changes into a logical sequence of small, iterative modifications that build on top of each other. Initial PRs establish core infrastructure, while subsequent ones build on those changes. Stacks enforce the separation of features into smaller parts while allowing workstreams to progress in parallel without blocking.

The idea behind stacked diffs is that you can keep working on your main branch, and worry about reviews later. You check out the main branch and start working on it, make a small change, and commit this as a diff – a very small pull request. You then continue working, creating a second diff, a third, and so on. — Gergely Orosz, The Pragmatic Engineer

Returning to the recommendation algorithm example, a developer designing the algorithm can break it into three parts—the algorithm itself, the database queries, and the front-end interactions. This can help you get reviews faster, and merge into main more quickly. 

While stacking is possible with GitHub, specialized tools like Graphite and ghstack help manage dependencies across feature branches. They automate rebasing and synchronizing cascading changes between linked, stacked PRs—leaving your team free to work on the real challenges instead of getting bogged down by git operations.

3. Provide contextual details

Additionally, PR authors should provide ample contextual details to help reviewers evaluate the changes more easily. Make it a team-wide practice that the descriptions should clearly state the motivation behind changes, with links to related domain logic and prior discussions around alternatives or constraints.

For user-facing changes, embed before/after screenshots to clearly show the user interface (UI) and behavioral deltas. Outline edge cases validated through unit testing across various environments, browsers, and datasets.

Finally, explicitly call out any breaking changes, downstream integration impacts, or compatibility considerations that reviewers should specifically analyze so potentially risky modifications get the scrutiny they deserve.

4. Implement architectural safeguards

When it comes to software architecture, it's important to implement some safeguards that prevent quality from slowly worsening over many incremental changes. 

  • Focus on building modular components that make testing and releasing code faster and easier.

  • Abstraction is key —you want to break out functionality into modular chunks to reduce complexity, making the code more extensible and easier to maintain. Another aspect is handling updates thoughtfully—maintain compatibility with previous versions unless you have precisely coordinated timelines to sunset legacy systems. 

  • It also helps to designate reviewers based on responsibility of impacted components since they will best understand the potential downstream impacts with a big-picture view.

5. Encourage real-time collaboration

While working on features and fixes, try to encourage developers to actively seek feedback and engage others in the moment instead of waiting for PR reviews. 

Find opportunities for rapid prototyping, pair programming, informal reviews, and live discussions that help promote the flow of ideas and contextual collaboration rather than blocking developers.

The idea is to create a supportive environment where asking questions is viewed as a sign of responsible development and gradually reinforce the behavior by rewarding it publicly. You also need to work towards making the feedback loop frictionless so it becomes second-nature to developers. 

At the end of the day, we want to create an environment where developers not only feel supported and appreciated, but also productive—with as few things blocking their workflows as possible.

6. Loop in diverse expertise

An often underestimated aspect is identifying the right reviewers for each PR based on the specific types of analysis required. 

Don't haphazardly assign reviewers. Instead, thoughtfully tap both technical and non-technical experts that can best validate modifications.

  • For core infrastructure changes, loop in senior engineers who handle platform reliability to assess operational impacts. 

  • For UI updates, include UX designers to represent end-user needs. 

  • Treat security reviews as integral for changes touching encryption, access controls, and exposure boundaries.

The reviews become more efficient and accurate since the reviewers can focus on what they do best instead of context-switching. Small PRs also help here, as you can pinpoint concerns, making it easier to granularly assign reviewers based on their domain expertise.

7. Actively balance team bandwidth

Scaling code review requires balancing team bandwidth against incoming PR volume to avoid hitting unmanageable queues. 

Begin by setting expectations around PR turnaround times based on team capacity, limiting work-in-progress pull requests. 

 Measuring metrics like “time to first review” and “time from publish to merge” can help identify shortcomings in your pull request workflows.

"If you are not in the middle of a focused task, you should do a code review shortly after it comes in. One business day is the maximum time it should take to respond to a code review request (i.e., first thing the next morning)." — Speed of Code Reviews, Google

When making any changes to existing process, remember to gather feedback from engineers and other stakeholders to understand their perspective.

8. Implement automation throughout the workflow

Upon publishing a PR, make sure changes are run through some form of automated code review and linting. You can leverage tools like GitHub Actions and Jenkins (using SonarQube or Checkstyle) to catch syntax errors, enforce style guides, and discover security vulnerabilities. 

This will:

  • Free up human reviewer time to focus on business logic assessments.

  • Enforce style and quality standards across the entire codebase.

  • Surface more subtle or convoluted issues humans may miss.

Adding automated reviews as a required PR step will filter out many basic defects like minor styling, complexity, and vulnerability issues before a human review occurs. Allow automation to handle the frequent shallow issues so humans can focus their effort assessing deeper logic and UX.

Apart from code review, identify opportunities anywhere in the development lifecycle that can be automated—from code analysis to testing and release management. 

The main goal is increasing developer productivity, not just mechanically enforcing rigid rules. 

The bigger picture

When done right, efficient pull requests resolve workflow bottlenecks and actively accelerate team momentum long-term. That happens by framing changes, helping reviewers understand differences, and inviting expert input across disciplines. 

Reviews begin to feel less like approvals and more like helpful conversations giving developers the confidence to build faster and gain contextual knowledge. However, lasting velocity gains come from actively refining systems over time. 

  • Track key metrics to guide experiments with new workflows.

  • Automate repetitive tasks to conserve focus for high-priority tasks.

  • Open up the dialogue with your team members to discuss best practices and gather feedback on incremental workflow changes.

The real win materializes when a culture of humble self-betterment takes root organically. Pull requests become collaboration points and help take your team to peak development and excellence—but only for teams that invest heartfelt energy into implementing and continually improving the workflows.

How to continuously improve pull request practices?

Optimizing pull request practices isn't a one-time initiative but an ongoing commitment. To sustain collaboration velocity, teams must actively strengthen the ecosystem through metrics-driven experimentation, knowledge sharing, and intelligent automation.

Start tracking the numbers

Monitor key metrics like review turnaround time, bugs caught, and time-to-merge. Then, start scheduling regular retrospectives to discuss insights, trends, and areas needing fine-tuning.

Encourage controlled experimentation

Try variations around review cadence, PR communication modes, and tooling integrations to determine what clicks best. Also, survey developers regularly to hear what's working and what is frustrating. Start small with any new workflows, make your team get a hang of it, and then start rolling out widely. 

Promote knowledge sharing

Make time for developers to review each other's code informally. This will also help spread skills and get feedback before the code is sent for review. Run training workshops to teach best practices for writing and assessing pull requests. When you see proactive collaboration among team members, celebrate it publicly.

Get the most out of your pull requests

Pull requests offer a unique opportunity—a chance to build connections, encourage growth, and compound team talents into collective achievements greater than any individual contribution. 

The teams that actively optimize pull requests automatically set in motion a flywheel effect, pushing the products and the team members to new heights. 

However, realizing the potential for new PR workflows needs intention and care.

The deciding factor is whether teams can invest the time and effort in streamlining the technical and cultural infrastructure needed for friction-free collaboration. 

That’s where tools like Graphite come into the picture. 

They provide the missing layer—automation of operational drudgery—allowing your senior developers to focus on high-value assessments. Graphite’s built-in integrations also streamline cross-linking stacked pull requests while advanced analytics offer visibility into bottlenecks—helping you improve workflows through data-backed decisions. 

Try Graphite today and experience how these pull request practices can supercharge your team’s productivity with minimal effort.