The Quiet Luxury of scratch.md
What is a scratch.md file? A simple trick to pin a distraction-free scratchpad in VS Code or any editor without polluting git.
I first fell in love with scratch files inside JetBrains DataGrip.
When etching ad-hoc SQL queries (most days having fun in PostgreSQL, but occasionally wrestling whatever antique dialect was forged in 1992), the last thing you want is temp_query_v2.sql cluttering your git tree. You just need an uncommitted sandbox to test syntax.
Have you ever wondered what a scratch.md file actually is?
Think of it as digital scrap paper. It’s an unindexed, throwaway Markdown file pinned right inside your editor. No git commits, no naming anxiety, no complex note-taking system—just a clean buffer between raw thought and finished work.
You can set one up in 5 seconds in VS Code, Cursor, or Windsurf:
- Create a
scratch.mdin your project or home folder. - Right-click the tab and select Pin (VS Code pinned tabs tuck neatly to the left and never get closed by "Close Others").
- Add
scratch.mdto.git/info/excludeso git never sees it.
Whenever a fleeting idea strikes or you need to draft a message, it’s already open and waiting.
Drop the needle, test the cut, wipe the deck.

Get new posts by email
New writing in your inbox. Unsubscribe anytime.