Remove Metadata Before Uploading to GitHub
You take a quick screenshot to drop into a README, a bug report, or a pull request — and push it straight to a public repo. The screenshot looks clean: just a terminal window or a UI. But the image file itself can carry metadata you never see on screen, and once it's committed, it doesn't just sit on GitHub — it's in the repo's history, forever, even if you delete the file later.
Why this is a developer-specific problem
Most privacy advice about photo metadata is aimed at phone pictures and GPS tags. Developer screenshots are different: they're less likely to carry location data, but more likely to carry things that matter in a different way — a device name, an editing tool's signature, or metadata written by a screenshot utility that includes a local file path or username. On a personal repo that's a minor leak. On an open-source project, it's public and permanent the moment you push.
Git makes this worse than a normal file share. Deleting the image in a later commit doesn't remove it — the original blob is still reachable in the repo's history unless someone does a full history rewrite. The only realistic fix is to not commit the metadata in the first place.
What's actually in a typical dev screenshot
- EXIF / capture info — some screenshot tools write a device or software tag.
- XMP / IPTC — if the image passed through an editor, look for author or software fields.
- Appended data — occasionally extra bytes left by an editing or annotation tool.
- What's visible in the frame — this is the bigger risk in practice: usernames, hostnames, API keys, or internal URLs sitting in the terminal or browser tab you screenshotted. Metadata scanning won't catch this — you have to look at the image yourself.
Check it before you commit — not after
Once an image is merged into a shared branch, other people have already pulled it. The window to fix it cleanly is before the commit, not after. With scrub, that's a fast local step:
- Drop the screenshot inBefore you `git add` it. Nothing uploads anywhere.
- See what's insidescrub lists any EXIF, XMP or appended data it finds.
- Click CleanYou get a copy with the metadata stripped, losslessly — commit that one instead.
This covers image metadata. It's still on you to eyeball the actual pixels for secrets in the frame — no metadata tool can do that part.
The short version
A screenshot in a commit is permanent the moment it's pushed. Strip its metadata locally before you add it — and glance at what's visible in the frame while you're at it. Get scrub free and clean a screenshot before your next commit.