We've all been there. You're looking through a project's history (maybe even your own) and you find this:
git log --oneline
a1b2c3d (HEAD -> main) fix bug
e4f5g6h update
c7d8e9f more stuff
b0a1b2c temp commit
It's a mess. It's uninformative, unprofessional, and completely useless when you're trying to find which change broke the build.
But what if I told you that you could have a clean, standardized, and useful git history with almost zero extra effort? I recently posted a Reel on my "Prism" channel showing this exact trick, and here’s the detailed breakdown.
The Problem: Commit Message Fatigue
The issue isn't that we don't want to write good commit messages. It's that following a specific format like type(scope): description
can be tedious. Remembering all the types (feat
, fix
, chore
, docs
...) and getting the syntax right breaks your workflow.
The Solution: Conventional Commits + VS Code
Conventional Commits is a simple specification for adding structure to commit messages. This not only makes them readable for humans, but also for machines, allowing for cool things like automatic CHANGELOG generation and semantic versioning.
The real magic happens when a tool does the work for you. That's where the Conventional Commits extension for VS Code comes in.
Your New 3-Step Workflow
Instead of blindly typing in the "Source Control" message box, you'll now do this:
- Stage Your Changes: Make your code changes as you normally would. In my case, I'm working on a small graphics engine in C++.
- Use the Extension's Helper: Once your changes are staged, look for the small </> icon in the "Source Control" panel's title bar.
-
Fill in the Blanks: Clicking the icon opens an interactive menu that guides you step-by-step:
- Select the type of change: Choose the type. Is it a new feature? feat. A bug fix? fix. Something that doesn't affect production code? chore.
- What is the scope of this change: Define the scope. In my C++ project, this could be rendering, physics, core, etc.
- Write a short, imperative tense description: The clear, concise description. For example: Add initial triangle rendering logic.
- Provide a longer description (Optional): Add more detail if needed.
- Are there any breaking changes? / Does this change affect any open issues?
And that's it! The extension perfectly formats the commit message for you.
The Result: A Pristine History
Compare the mess from the beginning with this:
git log --oneline
f9e8d7c (HEAD -> main) feat(rendering): Add initial triangle rendering logic
a2b3c4d fix(core): Correct memory leak in object creation
d5e6f7g chore(deps): Update Glad and GLFW libraries
It's readable, professional, and incredibly useful.
This is a tiny change to your workflow that has a massive impact on your project's quality, especially when collaborating with others.
If you found this helpful, check out my YouTube channel, Prism, for more practical tutorials on graphics, web, and desktop development.
What are your favorite productivity extensions for VS Code? Let me know in the comments below!
Top comments (0)