All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Git One-Liner for Deleting Merged Branches, Found in CIA's Vault7 Leak

By

spencerldixon

3mo ago· 2 min readen

Summary

The article describes a useful git one-liner command for cleaning up merged branches that was discovered in the CIA's leaked Vault7 documents from 2017. While most of the CIA's developer documentation contained standard git tips, this particular command for deleting all locally merged branches has remained valuable to the author, who has kept it in their shell configuration file for years.

Key quotes

· 4 pulled
In 2017, WikiLeaks published Vault7 - a large cache of CIA hacking tools and internal documents. Buried among the exploits and surveillance tools was something far more mundane: a page of internal developer documentation with git tips and tricks.
But one tip has lived in my ~/.zshrc ever since.
Over time, a local git repo accumulates stale branches. Every feature branch, hotfix, and experiment you've ever merged sits there doing nothing. git branch starts to look like a graveyard.
How to delete all merged git branches locally with a single command. This one-liner has been in my zshrc since 2017 — I found it buried in the CIA's Vault7 leak...
Snippet from the RSS feed
How to delete all merged git branches locally with a single command. This one-liner has been in my zshrc since 2017 — I found it buried in the CIA's Vault7 l...

You might also wanna read