<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>svnscha - workflow</title>
    <subtitle>automating annoying tasks, sharing tips, and embracing less frustration</subtitle>
    <link rel="self" type="application/atom+xml" href="https://svnscha.de/tags/workflow/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://svnscha.de"/>
    <generator uri="https://astro.build/">Astro</generator>
    <updated>2025-04-27T00:00:00+00:00</updated>
    <id>https://svnscha.de/tags/workflow/atom.xml</id>
    <entry xml:lang="en">
        <title>Vibe Coding is So Damn Real</title>
        <published>2025-04-27T00:00:00+00:00</published>
        <updated>2025-04-27T00:00:00+00:00</updated>
        <author>
          <name>Sven Scharmentke</name>
        </author>
        <link rel="alternate" type="text/html" href="https://svnscha.de/posts/vscode-vibe-coding/"/>
        <id>https://svnscha.de/posts/vscode-vibe-coding/</id>
        <summary type="html">Because watching GitHub Copilot refactor files with a single prompt is the most satisfying thing you'll see today.</summary>
        <content type="html" xml:base="https://svnscha.de/posts/vscode-vibe-coding/">&lt;h2 id=&quot;why-you-ask&quot;&gt;Why, You Ask?&lt;/h2&gt;
&lt;p&gt;Ever had that moment when your coding flow is so perfect it feels like you and your tools are in some kind of cosmic alignment? That's vibe coding. It's when the friction between thought and implementation practically disappears. And let me tell you, with GitHub Copilot and VS Code, this isn't just a fleeting sensation-it's a consistent reality.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I'm tired of writing about theoretical capabilities. Let me show you something concrete.&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&quot;a-childhood-dream-come-true&quot;&gt;A Childhood Dream Come True&lt;/h2&gt;
&lt;p&gt;Let me share something personal: since I first started coding, I've had this recurring dream. A dream where I could simply talk to my computer, tell it what I want in plain language, and watch as it translates my intentions into working code. No syntax gymnastics. No hunting for semicolons. Just pure, frictionless creation.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&quot;Hey computer, refactor this module to use dependency injection instead of globals.&quot;&lt;/li&gt;
&lt;li&gt;&quot;Computer, optimize this database query, it's running too slow.&quot;&lt;/li&gt;
&lt;li&gt;&quot;Add translation support to all user-facing strings in this module.&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For decades, this remained firmly in the realm of science fiction-something for Star Trek episodes where they casually ask the computer to &quot;reconfigure the deflector dish&quot; and it just... happens.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;DAMN, we're just there now.&lt;/strong&gt; Not in some distant future, not as a tech demo, but as a practical, everyday reality in my development workflow.&lt;/p&gt;
&lt;h2 id=&quot;real-world-context-nofidoc&quot;&gt;Real-World Context: Nofidoc&lt;/h2&gt;
&lt;p&gt;A little context: In my free time, I've been pushing the boundaries of what's possible with AI-assisted coding-well beyond just casual experiments. While I also use these workflows at work, Nofidoc has become my personal playground for exploring how far I can take this technology. It's a space where I can try things that aren't always ready for the spotlight, but the results have been too compelling not to share (even if I'm keeping things a bit low-key for now).&lt;/p&gt;
&lt;p&gt;The codebase uses Qt for the UI components, has a wizard-based document import flow, and handles various document formats with a focus on PDFs. It's exactly the kind of mid-sized C++ project where refactoring used to be tedious and error-prone.&lt;/p&gt;
&lt;h2 id=&quot;the-perfect-pairing&quot;&gt;The Perfect Pairing&lt;/h2&gt;
&lt;p&gt;VS Code with GitHub Copilot doesn't just assist your coding-it transforms it. No more wasting precious brain cycles on trivial tasks. No more tedious refactoring operations that make you question your career choices at 2 AM.&lt;/p&gt;
&lt;p&gt;I recently needed to refactor the document import workflow to remove direct database dependencies in the wizard component. Why having that in the first place? Well, getting something proof-of-concept-ish is the answer. Anyways, this is a classic case of improving architecture by decoupling components, but it typically requires careful changes across multiple files and understanding the entire call hierarchy.&lt;/p&gt;
&lt;h2 id=&quot;see-the-entire-workflow-in-action&quot;&gt;See The Entire Workflow In Action&lt;/h2&gt;
&lt;p&gt;I've recorded a full ~6-minute video showing the entire refactoring process from start to finish. You'll see me:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Prompt Copilot with my refactoring requirements&lt;/li&gt;
&lt;li&gt;Watch the initial code changes being proposed&lt;/li&gt;
&lt;li&gt;Hit compilation errors (because real-world code is messy!)&lt;/li&gt;
&lt;li&gt;Provide additional guidance to Copilot&lt;/li&gt;
&lt;li&gt;Get a complete, working solution&lt;/li&gt;
&lt;/ol&gt;
&lt;video class=&quot;cast&quot; src=&quot;/casts/2025-04-27-vibe.webm&quot; controls&gt;
  Your browser does not support the video tag.
&lt;/video&gt;
&lt;p&gt;What's remarkable here is not just that Copilot could make the changes, but how the entire interaction feels like working with a senior developer who deeply understands your codebase.&lt;/p&gt;
&lt;h2 id=&quot;the-real-example-documentimportwizard-refactoring&quot;&gt;The Real Example: DocumentImportWizard Refactoring&lt;/h2&gt;
&lt;p&gt;Here's a snapshot of what happened in the video. I needed to update the DatabaseWidget class to use the new API of our DocumentImportWizard that we had refactored to remove direct database dependencies.&lt;/p&gt;
&lt;p&gt;Copilot analyzed the code and came up with this solution:&lt;/p&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;cpp&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A9955&quot;&gt;// Before refactoring, direct database dependency:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#569CD6&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color:#4EC9B0&quot;&gt; DatabaseWidget&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;onDocumentImportWizard&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#569CD6&quot;&gt;    auto&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt; importWizard&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt; DocumentImportWizard&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;_database&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#569CD6&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;    importWizard&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;exec&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A9955&quot;&gt;// After refactoring, using callback approach:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#569CD6&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color:#4EC9B0&quot;&gt; DatabaseWidget&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;onDocumentImportWizard&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#569CD6&quot;&gt;    auto&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt; importWizard&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt; DocumentImportWizard&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#569CD6&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;    importWizard&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;setGetDocumentTypesCallback&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;([&lt;/span&gt;&lt;span style=&quot;color:#569CD6&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;]() {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;        if&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; (!&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;_database&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;            return&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt; QList&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#4EC9B0&quot;&gt;DocumentType&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;&amp;gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;            &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#569CD6&quot;&gt;        auto&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt; docTypeService&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;_database&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;getDocumentTypeService&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;        if&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; (!&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;docTypeService&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;            return&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt; QList&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#4EC9B0&quot;&gt;DocumentType&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;&amp;gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;            &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;        return&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt; docTypeService&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;getDocumentTypes&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;    });&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;    importWizard&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;exec&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Copilot explained its reasoning:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&quot;I've updated the onDocumentImportWizard() method in DatabaseWidget to use the new refactored API of our DocumentImportWizard class. The key changes were:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;1. Removed passing the _database parameter directly to the DocumentImportWizard constructor&lt;/em&gt;
&lt;em&gt;2. Added a call to setGetDocumentTypesCallback() with a lambda that:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Checks if _database is valid&lt;/li&gt;
&lt;li&gt;Gets the document type service from the database&lt;/li&gt;
&lt;li&gt;Returns the document types list from the service&lt;/li&gt;
&lt;li&gt;Returns an empty list if any step fails&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;This completes the refactoring work by updating all the calling code to use the new API. The change maintains the same functionality but with a cleaner design that removes direct dependencies on the database pointer.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The implementation follows modern C++ practices by using a lambda to encapsulate the specific functionality needed (getting document types) while keeping the rest of the database access logic out of the wizard class. This makes the code more maintainable and easier to test.&quot;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is exactly the kind of architectural improvement that typically takes deep understanding of both the codebase and software design principles. Yet Copilot produced it in seconds.&lt;/p&gt;
&lt;h2 id=&quot;the-key-lesson-human-ai-collaboration&quot;&gt;The Key Lesson: Human-AI Collaboration&lt;/h2&gt;
&lt;p&gt;My main takeaway is simple: &lt;strong&gt;AI tools work best when you bring your own domain knowledge.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Just before that, I was debugging a frustrating issue with field registration in that document import wizard. The fields weren't passing values between pages correctly. I asked Copilot to help fix the bug and it initially proposed an overly complex workaround that would have been a maintenance nightmare.&lt;/p&gt;
&lt;p&gt;So I gave it a hint:&lt;/p&gt;
&lt;p&gt;&quot;I think there's an issue with the registerField calls for 'importSuccessCount' and 'importErrorCount'. The implementation doesn't specify the property name correctly.&quot;&lt;/p&gt;
&lt;p&gt;And just like that, it had an &quot;aha!&quot; moment. It immediately identified the real issue:&lt;/p&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;cpp&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A9955&quot;&gt;// Before (buggy implementation):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;registerField&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;&quot;importSuccessCount&quot;&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#569CD6&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A9955&quot;&gt;// After (Copilot's correct fix):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;registerField&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;&quot;importSuccessCount&quot;&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#569CD6&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;&quot;importSuccessCount&quot;&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This simple fix resolved the entire issue. The fix works because it properly uses the Qt property system (third parameter) as the remaining code and pages expected, whereas Copilot's initial workaround was mega ugly - setting properties directly with setProperty() calls. With just a small hint about the actual problem, we were back on track. This perfectly illustrates why domain expertise remains critical - AI tools can suggest solutions, but knowing which ones make sense in your framework requires human judgment.&lt;/p&gt;
&lt;p&gt;Sometimes AI tools need a gentle nudge in the right direction, and then they're off to the races again.&lt;/p&gt;
&lt;h2 id=&quot;not-always-perfect-magic&quot;&gt;Not Always Perfect Magic&lt;/h2&gt;
&lt;p&gt;Let me be real with you - it's not all sunshine and rainbows. AI assistance sometimes misses the mark, and when it does, you need to steer it in the right direction. But I've found that:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The initial attempt is usually close&lt;/li&gt;
&lt;li&gt;AI is exceptionally good at understanding feedback&lt;/li&gt;
&lt;li&gt;With the right hints, it can quickly recover and find the optimal solution&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The collaboration workflow is what makes all the difference. Instead of wrestling with a tool, it feels like having a junior developer who's eager to learn and quick to adapt.&lt;/p&gt;
&lt;h2 id=&quot;what-i-learned&quot;&gt;What I Learned&lt;/h2&gt;
&lt;p&gt;This isn't just about saving time (though I saved HOURS). It's about changing how we think about coding. When you can express your intent in natural language and have it accurately translated into code changes, you're no longer programming computers-you're conversing with them.&lt;/p&gt;
&lt;p&gt;The barrier between thinking and implementing just got so much thinner.&lt;/p&gt;
&lt;h2 id=&quot;getting-this-setup-yourself&quot;&gt;Getting This Setup Yourself&lt;/h2&gt;
&lt;p&gt;Want this superpower? Here's what you need:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;VS Code&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GitHub Copilot&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A clear understanding of your codebase&lt;/strong&gt; - To craft effective prompts&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That's it! No complex configuration, no elaborate plugin chains.&lt;/p&gt;
&lt;p&gt;Oh, which model? Right now I am using Claude 3.7 - it's so good.&lt;/p&gt;
&lt;h2 id=&quot;where-this-is-going&quot;&gt;Where This Is Going&lt;/h2&gt;
&lt;p&gt;You know that saying about technology and magic? This is it. We're witnessing the early days of a transformation in how software gets built. The tools are evolving to understand not just the syntax of our code, but the intent behind it.&lt;/p&gt;
&lt;p&gt;Could I have written a complex bash script to do some of this refactoring? Maybe.
Could I have used search-and-replace with regex? Probably.
Would either approach have understood the semantic meaning of my code well enough to know which strings need translation? Absolutely not.&lt;/p&gt;
&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;
&lt;p&gt;Vibe coding isn't just some feel-good developer term. It's that perfect state where you and your tools are in sync, where expressing your intent feels natural and immediate. With GitHub Copilot and VS Code, I'm experiencing this daily while building Nofidoc.&lt;/p&gt;
&lt;p&gt;If you're still doing manual refactoring in 2025, you're not just missing out on productivity-you're missing out on the pure joy of frictionless development.&lt;/p&gt;
&lt;p&gt;Try it. Feel it. Vibe code.&lt;/p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>A Git feature I should've met sooner!</title>
        <published>2025-04-04T00:00:00+00:00</published>
        <updated>2025-04-04T00:00:00+00:00</updated>
        <author>
          <name>Sven Scharmentke</name>
        </author>
        <link rel="alternate" type="text/html" href="https://svnscha.de/posts/git-worktree/"/>
        <id>https://svnscha.de/posts/git-worktree/</id>
        <summary type="html">I was living in stash-hell and didn't even know it.</summary>
        <content type="html" xml:base="https://svnscha.de/posts/git-worktree/">&lt;h2 id=&quot;why-you-ask&quot;&gt;Why, You Ask?&lt;/h2&gt;
&lt;p&gt;Because I thought I knew Git.
Like really. Branches? Merged. Rebased. Cherry-picked. Heck, I've even force-pushed into production (don't judge me). I've danced the &lt;code&gt;git stash&lt;/code&gt; tango more times than I care to admit, and I've rage-quit after realizing I checked out the wrong branch with uncommitted changes.&lt;/p&gt;
&lt;p&gt;But then-then-I discovered &lt;code&gt;git worktree&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;And everything changed.&lt;/p&gt;
&lt;h3 id=&quot;the-problem-with-the-normal-way&quot;&gt;The Problem With the &quot;Normal&quot; Way™&lt;/h3&gt;
&lt;p&gt;Let's say you're working on a feature. You're knee-deep in uncommitted changes, and suddenly you need to switch to another branch to hotfix or review something. What do you do?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;git stash&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git checkout other-branch&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Try to remember what you were doing in your branch later.&lt;/li&gt;
&lt;li&gt;Forget what you stashed and why.&lt;/li&gt;
&lt;li&gt;Cry&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is the standard Git workflow we all just kind of accept. It's chaotic good at best.&lt;/p&gt;
&lt;h3 id=&quot;enter-git-worktree&quot;&gt;Enter: &lt;code&gt;git worktree&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;What if I told you... you could just check out multiple branches at the same time? Each in its own separate folder. No stash. No backflips. No existential dread.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;git worktree&lt;/code&gt; is a built-in Git feature that lets you:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Check out multiple branches at once&lt;/li&gt;
&lt;li&gt;Work on each one in its own directory&lt;/li&gt;
&lt;li&gt;Keep your mental state and filesystem intact&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;examples&quot;&gt;Examples&lt;/h3&gt;
&lt;p&gt;Create a new worktree for a feature branch&lt;/p&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; worktree&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; add&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; ../feature-x&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; origin/feature-x&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This checks out the &lt;code&gt;feature-x&lt;/code&gt; branch (fetched from &lt;code&gt;origin&lt;/code&gt;) into a new directory &lt;code&gt;../feature-x&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If it's a new feature you start locally, do this:&lt;/p&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; worktree&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; add&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; ../feature-x&lt;/span&gt;&lt;span style=&quot;color:#569CD6&quot;&gt; -b&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; feature-x&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This creates a new local branch &lt;code&gt;feature-x&lt;/code&gt; from your current &lt;code&gt;HEAD&lt;/code&gt; (usually &lt;code&gt;main&lt;/code&gt;) and checks it out into &lt;code&gt;../feature-x&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Wow. 🥳 No more &quot;wait lemme stash real quick.&quot;&lt;/p&gt;
&lt;p&gt;Now you can commit your fix, push it, and go back to your mess later. Like a civilized developer.&lt;/p&gt;
&lt;h4 id=&quot;list-all-worktrees&quot;&gt;List all worktrees&lt;/h4&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; worktree&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; list&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Because you will forget what you spun up after the third coffee.&lt;/p&gt;
&lt;h3 id=&quot;whats-the-catch&quot;&gt;What's the Catch?&lt;/h3&gt;
&lt;p&gt;Honestly? Not much. A few things to keep in mind:&lt;/p&gt;
&lt;p&gt;You can't check out the same branch twice. Git will yell at you. That's fair.&lt;/p&gt;
&lt;p&gt;Deleting a worktree is easy: just &lt;code&gt;git worktree remove ../feature-x&lt;/code&gt; (the directory) and that's it.&lt;/p&gt;
&lt;h3 id=&quot;why-you-need-this-in-your-life&quot;&gt;Why You Need This in Your Life&lt;/h3&gt;
&lt;p&gt;If you're working on multiple features, doing code reviews locally, fixing stuff mid-feature, or just trying to keep your brain from melting-&lt;code&gt;git worktree&lt;/code&gt; is the gift you didn't know Git included.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;No more stash juggling.&lt;/li&gt;
&lt;li&gt;No more &quot;which terminal had which branch again?&quot;&lt;/li&gt;
&lt;li&gt;No more &quot;accidentally committed to main&quot; horror stories.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Just clean, parallel workspaces from a single clone.&lt;/p&gt;
&lt;p&gt;Use it. Love it. Regret not learning it sooner.
I know I did.&lt;/p&gt;
</content>
    </entry>
</feed>
