from Hacker News

Show HN: Graphite – Stacked Diffs on GitHub

by tomasreimers on 9/19/23, 3:03 PM with 64 comments

TLDR; Graphite enables a git workflow called “stacking” - the fastest way to develop and ship code, which many large tech companies have been using for years. Graphite makes stacking available to anyone with a GitHub account.

Hi HN!

I’m Tomas, co-founder of graphite.dev, and today we’re launching Graphite after almost two years of development in closed beta. [1] Graphite started as an internal solution to our own problem. When we (engineers from Meta, Google and Airbnb) left our previous roles, we lost access to the internal code review tools we loved. So we built our own.

https://graphite.dev

---

Graphite is how the fastest developers ship code - it’s a developer tool that allows you to create smaller pull requests, stay unblocked, and ship faster with “stacking” (creating a set of dependent pull requests). Stacking [2] allows developers to break up large pull requests (PRs) into smaller ones that can be reviewed & merged independently, while keeping ongoing development unblocked. Engineering best practices at Google advise that a “reasonable” PR be around 100 lines, and recommend splitting PRs in order to achieve this through stacking or other methods. [3]

Unlike other tools like Phabricator, Gerrit, or Sapling, Graphite syncs seamlessly with your GitHub repositories, so that you don’t have to manage any extra infrastructure. This also means that even if your teammates don’t use Graphite yet, you still can.

Here’s what you can expect when you sign in to Graphite with your GitHub account:

(1) First class support for stacking: At its core, Graphite enables “stacking”—a workflow used by engineers at top companies like Meta and Google to create small, dependent sets of pull requests. The Graphite CLI, web app, and VS Code extension all come together to empower engineers to start stacking.

(2) Pull request inbox: You can think of this as your home page on Graphite, where you have full visibility into the status of all your PRs and know what still needs to be done across every repo, author, and stage of review. You can also create custom inboxes that filter PRs on reviewers, authors, labels, CI status, and more.

(3) Streamlined code review interface: Graphite’s pull request page removes tabs and minimizes distractions, with the aim of putting your code front and center. You can use keyboard shortcuts to navigate between files and comments or to move between PRs in your stack. You can also import custom memes and gifs to add some to your reviews too!

(4) AI-powered pull requests: Auto-generate a detailed description for every PR with our OpenAI integration. You can even turn your comments into suggested code changes (coming soon!).

(5) Real-time notifications: Connect Graphite to your Slack workspace to stay up-to-date on review requests, comments threads, merge status, and other activity on your PRs. For smaller PRs, you can leave a review (and even merge) directly from Slack.

(6) Stack-aware merges: Since Graphite is built to support a stacking workflow, it automates the manual work of rebasing PRs when it’s time to merge. You can merge your stacks with one click from the web app, or in a single command from the CLI.

Feel free to take a look at our getting started guide [4] or product tour video [5] for a tutorial on how to get started, and drop your comments to us below!

[1] http://graphite.dev/blog/launch

[2] http://stacking.dev

[3] https://google.github.io/eng-practices/review/developer/small-cls.html

[4] https://graphite.dev/docs/getting-started-with-graphite

[5] https://www.youtube.com/watch?v=sBcd9uopLOY

  • by DandyDev on 9/19/23, 6:00 PM

    Honest question: how did you folks determine your pricing? I totally get that what Graphite offers is valuable and can improve developer productivity. But from where I'm standing, the pricing is disproportionate to the value add.

    Github Enterprise - while of course not 1-to-1 comparable - offers so much more functionality for 2/3ds of the cost of Graphite. I'd expect Graphite to cost _less_ than Github Enterprise as it seems it could be positioned more as an add-on to what you get from Github.

    Am I missing something?

  • by jamesmishra on 9/19/23, 4:24 PM

    Graphite and stacked diffs are awesome! I really miss Phabricator from my time at Uber, and I've been sad ever since that nobody had built a superior developer experience based on the same concepts.
  • by juliennakache on 9/19/23, 4:16 PM

    Seems interesting! I've been very unhappy with Github workflow and UI for PRs. It's insane that each time you rebase a PR, you lose all your existing comments on that PR (i.e. they are no longer attached to lines in the UI).

    Does anyone know if you need Graphite to see a PR once it's been merged in the Github repo? I'm curious about how locked you in when you start using Graphite.

  • by Nezteb on 9/19/23, 4:44 PM

    I've followed Graphite for a while, and I just wish they supported GitLab. I know why they don't, but my current employer uses it and I've got major FOMO.
  • by njaremko on 9/19/23, 3:59 PM

    I've been using this for a few months now, and it's been an absolute joy to use.

    One thing that's been a bit annoying: my org enforces signed commits, and when you merge a stack, they sometimes rebase commits internally and lose the code signing, so you end up with an error to merge the rest of the stack.

    Aside from that, working with stacks has been great!

  • by satvikpendem on 9/19/23, 4:54 PM

    Hey Tomas, great to meet you a few months ago in NYC, congrats on the show HN. Graphite is a great tool, hope you're doing well!
  • by timvdalen on 9/19/23, 3:27 PM

    I've been using Graphite for a few months now (yay, finally works on cygwin!), and I've been really enjoying it.

    The command name change will take some time to get used to, though!

    I've run into a bug with 1.0 where it tries to query git for an object (something with ^tree) that it doesn't understand. I think I'm on a high enough git version, but that could be my issue.

  • by carlgao on 9/19/23, 8:09 PM

    Stacking code changes has been such a game changer that I wouldn't even consider working at a company where this developer workflow doesn't exist. Code reviewing without Graphite is like code reviewing with a typewriter instead of a computer.

    If you want to 1. multiply developer velocity 2. attract the best technical talent, use Graphite.

  • by Kdmalloch on 9/19/23, 3:33 PM

    Such a good idea, and such a good product. Congrats on the launch!
  • by bovermyer on 9/19/23, 5:13 PM

    I was very confused at first how a timeseries database would be used in a git workflow.
  • by xavhan on 9/19/23, 4:53 PM

    Ive been using it since mote than a year and it has become part of my toolbelt. Especially the cli that allow to seemlessly rebase multiple branches at the same time. Powerful tool, and nice community
  • by baq on 9/19/23, 5:15 PM

    I’ve tried using git brancheless, git spr and stacked git, but they aren’t sticking in my brain. Does this have a better chance for this interactive rebase and squashed merge user?
  • by geekster777 on 9/19/23, 11:53 PM

    Been playing with this as a beta user for a few months. I really like how the cli removes a ton of the footguns I've come to find with git. With Graphite I don't have to think too closely about navigating and reordering branches. It's removed a lot of my fears of "will this command clobber my workspace". The guard rails are up, but you can always drop into git if you need something specific.
  • by zurawiki on 9/19/23, 3:12 PM

    Excited to see the progress here on the public launch!

    Stacking was a meaningful time-saving as a FAANG sw eng. Excited to see stacking grow within the great tech community

  • by jpochtar on 9/19/23, 4:15 PM

    Love to see this! I miss stacked diffs from working at FB— Graphite looks like the best way to be productive outside FAANG internal tooling
  • by atpgenerator on 9/19/23, 3:27 PM

    I’ve tired the CLI, but couldn’t get into it. I’ll have to try the VSCode extension and give it another shot
  • by ikornaselur on 9/19/23, 6:10 PM

    Looks interesting! We already stack PRs by basically having a chain of branches, one on top of each other, that we review separately and merge in order.

    What benefit does Graphite provide further?

    Main pain point I imagine is dealing with rebases? What else?

  • by Xiulung on 9/19/23, 3:25 PM

    Excited to see what comes next!
  • by olafura on 9/19/23, 4:46 PM

    I don't understand how this is a difference between stacked diffs and feature branches. Github allows you to use feature branches. I can see there might be some convenience with tooling
  • by AirFuel on 9/19/23, 4:20 PM

    Simple but very compelling... Congrats to the Graphite team
  • by bilalq on 9/19/23, 6:14 PM

    I've been using Graphite since November 2021 and love it. Aside from stacking, their dashboard is also a huge improvement over Github's.
  • by astuyvenberg on 9/19/23, 4:28 PM

    Congrats on the launch, this looks great!
  • by Apreche on 9/19/23, 4:49 PM

    Going to keep my eye on this one.
  • by anvisha on 9/19/23, 3:51 PM

    Exciting launch, congrats!
  • by daniel_sushil on 9/19/23, 6:50 PM

    Great to see new players in this space. Congrats on the launch!
  • by bgenchel on 9/19/23, 3:52 PM

    congrats on the launch! excited to give it a go
  • by sond813 on 9/19/23, 4:34 PM

    Congrats on the launch!
  • by tr_user on 9/19/23, 5:48 PM

    is this in opposition to trunk based development?