A scratch.md file is an uncommitted Markdown file pinned inside your code editor that acts as disposable digital scrap paper.
Instead of letting a graveyard of unsaved Untitled-1 tabs pile up, it gives you a single persistent buffer for transient work. I first fell in love with this workflow using scratch files in JetBrains DataGrip. When writing throwaway scripts (querying a database, testing API payloads, or dissecting a legacy PowerShell snippet from a 2008 Microsoft forum), you don't want permanence. You just need an uncommitted sandbox.
Most productivity tools demand folders, tags, and database sync. A pinned scratch file asks nothing of you:
- Create
scratch.mdin your project or home directory. - Right-click the tab and select Pin (VS Code pinned tabs stay anchored to the left and survive "Close Other Tabs").
- Add
scratch.mdto your global~/.gitignoreor local.git/info/excludeso git never tracks it.
It won't pollute your git history, trigger code reviews, or accumulate technical debt. It simply provides a distraction-free surface to think with your hands before deciding what deserves to become permanent.

Related: why I use fish shell and how I stopped losing time to cd ../...