DEV Community

Wonder2210
Wonder2210

Posted on

Building My Own Solution: How a VSC Extension Fixed My Git Workflow

As developers, we're conditioned to reuse rather than reinvent. We instinctively reach for libraries, plugins, Stack Overflow answers, or AI before considering whether we should—or could—build our own solution. I was no different.

One of my regular workflows involved editing a configuration file exclusively for development purposes. As changes accumulated, I kept accidentally committing that file along with my actual work. The manual process—dropping to the terminal, carefully staging the right files over and over—became tedious. Like many of us, I kept thinking, "Someone must have built a better way."

But no one had—at least, not the way I needed it.

So I built it myself.

This post isn't just about writing a VSC extension—it's about why solving your own problems first is one of the most valuable habits a developer can cultivate.

The Problem

Photo by Magnet.me on Unsplash

Working with Git presented me with two frustrating options when handling specific files:

  1. Precise manual staging: Carefully selecting individual files to stash or commit
  2. Error-prone workarounds: Manually copying changes, resetting, and reapplying changes

I searched for existing extensions, but none offered the simple, one-click solution I needed.

The Realization

Mark Fletcher-Brown on Unsplash

Instead of waiting for someone else to solve my problem, I asked myself:

  • Why not build it myself?
  • What's actually stopping me?

The answer? Nothing but my own habits and assumptions.

The Process

Kvafilik on Unsplash

My initial assumption: "Building a VSCode extension must be complicated." After some research, I discovered it's more accessible than most developers think.

The official VSCode extension guide provides everything you need, complete with practical examples.

For Git integration, I found simple-git, a perfect npm package for my needs.

My development approach:

  1. Define the workflow: Shortcut-based or UI button?
  2. Build a basic prototype: Core functionality first
  3. Iterate and refine: Add features gradually

"Reading docs teaches you how to use tools. Building them teaches you how they work."

The Unexpected Wins

Building this small tool provided benefits I hadn't anticipated:

  • Deeper Git understanding: I now truly grasp how stashes work
  • Transferable skills: Applicable to other VSC automation
  • Conversation starter: Colleagues asked about the solution
  • Mindset shift: Now I first ask "Can I automate this?"

Conclusion

Should you always build instead of reuse? Of course not—that wouldn't be time-efficient. But when you:

  • Want deeper understanding
  • Have some free time
  • Need a perfect-fit solution

...building your own tool can be incredibly rewarding.

Next time you face a workflow annoyance, ask yourself:

  1. How would I solve this if no existing tools existed?
  2. What's the simplest version I could build today?

You might surprise yourself with what you can create.


Try the extension:

Git File Stash on VSC Marketplace

Contribute or fork:

GitHub Repository

Top comments (0)