Git Worktree-First Workflow + Conductor | Barret Schloerke | Data Science Lab
The Data Science Lab is a live weekly call. Register at pos.it/dslab! Discord invites go out each week on lives calls. We'd love to have you! The Lab is an open, messy space for learning and asking questions. Think of it like pair coding with a friend or two. Learn something new, and share what you know to help others grow. On this call, Libby Heeren is joined by Barret Schloerke, who walks through git worktrees and a worktree-first way of working using a tool called Conductor π Barret, from the Shiny team at Posit, shows why he's replaced his entire "git checkout a new branch" habit with creating a new worktree instead. He explains how worktrees let you check out multiple branches at once as full, separate folder copies (his analogy: each worktree is its own stove in the kitchen), how that makes juggling coding agents and long-running tasks less painful (painless??), and how Conductor orchestrates it all, auto-generated PRs, and does one-click merges. He also answers a ton of great questions from the Lab crew about memory usage, monorepos, orphan branches, data science use cases, and the mind-bending idea that there's "no local main." The question-asking is the best thing about joining the lab live!! We hope you'll walk away ready to open a text file that doesn't matter and try worktrees for yourself! Just go play. Hosting crew from Posit: Libby Heeren, Isabella Velasquez Barret Schloerke's GitHub: https://github.com/schloerke/ Barret Schloerke's Bluesky: https://bsky.app/profile/schloerke.com Barret Schloerke's LinkedIn: https://www.linkedin.com/in/schloerke/ Barret Schloerke's Posit profile: https://opensource.posit.co/people/barret-schloerke/ Resources mentioned in the video and chat: π Conductor (Mac app for orchestrating coding agents): https://www.conductor.build/ π Conductor docs about working in monorepos: https://www.conductor.build/docs/guides/repositories/monorepos π Official git worktree docs: https://git-scm.com/docs/git-worktree π Git worktree like a boss (blog post): https://dev.to/metal3d/git-worktree-like-a-boss-2j1b π Roborev β robotic code reviewer by Wes McKinney: https://www.roborev.io/ π Paseo β Conductor alternative for non-Mac users: https://paseo.sh/ π Spokenly β free AI dictation app for Mac, iPhone & Windows: https://spokenly.app/ π Superpowers β agentic skills framework: https://github.com/obra/superpowers π Julia extension for Positron: https://github.com/TidierOrg/positron-julia π DS Lab on GitHub in Positron: https://www.youtube.com/watch?v=JTv4IbFzI7M&list=PL9HYL-VRX0oSeWeMEGQt0id7adYQXebhT&index=7 π Andrew Heiss's DS Lab on free tools & Positron workflows: https://www.youtube.com/watch?v=kqYbJoebrwE π Michael Chow's dbt talk: https://www.youtube.com/watch?v=EYdb1x1cO9U βΊ Subscribe to Our Channel Here: https://bit.ly/2TzgcOu Follow Us Here: Website: https://www.posit.co Hangout: https://pos.it/dsh The Lab: https://pos.it/dslab LinkedIn: https://www.linkedin.com/company/posit-software Bluesky: https://bsky.app/profile/posit.co Thanks for hanging out with us! π Timestamps 00:00 Introduction 02:18 Explaining the core concept of Git Worktrees 06:14 "When is using WorkTrees important and valuable?" 08:34 Demoing Conductor and Git Worktrees in action 09:11 "Can you have a 'sparse' work tree?" 11:16 Demoing creating a new work tree in Conductor 13:27 "Where does it make this copy? Where does it live? Is it in the same working directory?" 16:12 Demoing how to create and merge a pull request in Conductor 18:56 "Is RoboRev an example of an alternative to Conductor, or does it serve a different purpose?" 21:00 "Can WorkTrees open an orphan branch that is only a subdirectory of the main repo?" 22:13 "Are WorkTrees specifically useful for when you're using an agent workflow, or can they be useful without agents?" 27:54 "Is this workflow mostly for software development, or could you think of use cases for data science or analysis?" 31:14 "I'm wondering if work trees are a way to get around rendering multiple Quarto reports?" 32:37 "What is CI? Can you define that for us?" 33:37 "Do you need something like Conductor to work with WorkTrees, or can you just use it in your terminal?" 33:48 Managing WorkTrees in the Positron UI 36:08 "How do reversions work?" 36:30 "What is Memphis?" 38:16 "Is Conductor measuring current RAM usage up in the upper left?" 38:32 "Is there a good way to keep track of how much memory you are filling up, and when do you know it's time to delete them?" 41:51 "What is the little red, yellow, green in the upper left?" 44:06 "What do we do if we're on Windows? Is there anything comparable that you know of that's on Windows?" 48:15 "Are you a Mac user or a PC user?" 48:34 "If each city is a work tree, where is the one true city?" 50:18 "Do you ever get into situations where you need to fix something, but it depends on what you're doing right now?" 56:11 "Are we operating in a world where you don't push directly to main, you just make a new branch?"