{
    "version": "https:\/\/jsonfeed.org\/version\/1.1",
    "title": "Blog — George Mishurovsky: posts tagged git",
    "_rss_description": "A blog by George Mishurovsky — a senior software engineer with a medical degree. Drawing from both engineering and scientific thinking, he explores software, architecture, design, psychology, and product thinking.",
    "_rss_language": "en",
    "_itunes_email": "george@mishurovsky.com",
    "_itunes_categories_xml": "",
    "_itunes_image": "https:\/\/mishurovsky.com\/blog\/pictures\/userpic\/userpic-square@2x.jpg?1753619610",
    "_itunes_explicit": "no",
    "home_page_url": "https:\/\/mishurovsky.com\/blog\/?go=tags\/git\/",
    "feed_url": "https:\/\/mishurovsky.com\/blog\/?go=tags%2Fgit%2Fjson%2F",
    "icon": "https:\/\/mishurovsky.com\/blog\/pictures\/userpic\/userpic@2x.jpg?1753619610",
    "authors": [
        {
            "name": "George Mishurovsky",
            "url": "https:\/\/mishurovsky.com\/blog\/",
            "avatar": "https:\/\/mishurovsky.com\/blog\/pictures\/userpic\/userpic@2x.jpg?1753619610"
        }
    ],
    "items": [
        {
            "id": "11",
            "url": "https:\/\/mishurovsky.com\/blog\/?go=all\/how-to-delete-all-local-git-branches\/",
            "title": "How to Delete All Local Git Branches in One Command",
            "content_html": "<p>First, checkout to main (or any other branch you want to clear from upstream branches).<\/p>\n<p>Now, let’s build the command, step by step.<\/p>\n<ol start=\"1\">\n<li>Check which branches were merged to the current branch:<\/li>\n<\/ol>\n<div class=\"e2-code-block\" data-language=\"sh\"><div class=\"e2-code-header\"><span class=\"e2-code-language\">Shell<\/span><button class=\"e2-code-copy\" type=\"button\" aria-label=\"Copy code to clipboard\" data-copy-text=\"Copy\" data-copied-text=\"Copied!\" data-failed-text=\"Failed\"><span class=\"e2-svgi\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 16 16\"><mask id=\"cutout\"><rect width=\"100%\" height=\"100%\" fill=\"white\"\/><rect x=\"1.75\" y=\"5.25\" width=\"9\" height=\"9\" stroke-width=\"1.33\" rx=\"1\" fill=\"black\" stroke=\"black\"\/><\/mask><rect x=\"5.25\" y=\"1.75\" width=\"9\" height=\"9\" rx=\"1\" stroke-width=\"1.33\" fill=\"none\" mask=\"url(#cutout)\"\/><rect x=\"1.75\" y=\"5.25\" width=\"9\" height=\"9\" rx=\"1\" stroke-width=\"1.33\" fill=\"none\"\/><\/svg>\r\n<\/span>Copy<\/button><\/div><pre><code class=\"hljs language-sh\">git branch --merged<\/code><\/pre><\/div><ol start=\"2\">\n<li>Filter out current branch from the output – it is marked by an asterisk (*):<\/li>\n<\/ol>\n<div class=\"e2-code-block\" data-language=\"sh\"><div class=\"e2-code-header\"><span class=\"e2-code-language\">Shell<\/span><button class=\"e2-code-copy\" type=\"button\" aria-label=\"Copy code to clipboard\" data-copy-text=\"Copy\" data-copied-text=\"Copied!\" data-failed-text=\"Failed\"><span class=\"e2-svgi\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 16 16\"><mask id=\"cutout\"><rect width=\"100%\" height=\"100%\" fill=\"white\"\/><rect x=\"1.75\" y=\"5.25\" width=\"9\" height=\"9\" stroke-width=\"1.33\" rx=\"1\" fill=\"black\" stroke=\"black\"\/><\/mask><rect x=\"5.25\" y=\"1.75\" width=\"9\" height=\"9\" rx=\"1\" stroke-width=\"1.33\" fill=\"none\" mask=\"url(#cutout)\"\/><rect x=\"1.75\" y=\"5.25\" width=\"9\" height=\"9\" rx=\"1\" stroke-width=\"1.33\" fill=\"none\"\/><\/svg>\r\n<\/span>Copy<\/button><\/div><pre><code class=\"hljs language-sh\">git branch --merged | grep -v \\*<\/code><\/pre><\/div><ol start=\"3\">\n<li>Turn the columnar output into a space-separated string:<\/li>\n<\/ol>\n<div class=\"e2-code-block\" data-language=\"sh\"><div class=\"e2-code-header\"><span class=\"e2-code-language\">Shell<\/span><button class=\"e2-code-copy\" type=\"button\" aria-label=\"Copy code to clipboard\" data-copy-text=\"Copy\" data-copied-text=\"Copied!\" data-failed-text=\"Failed\"><span class=\"e2-svgi\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 16 16\"><mask id=\"cutout\"><rect width=\"100%\" height=\"100%\" fill=\"white\"\/><rect x=\"1.75\" y=\"5.25\" width=\"9\" height=\"9\" stroke-width=\"1.33\" rx=\"1\" fill=\"black\" stroke=\"black\"\/><\/mask><rect x=\"5.25\" y=\"1.75\" width=\"9\" height=\"9\" rx=\"1\" stroke-width=\"1.33\" fill=\"none\" mask=\"url(#cutout)\"\/><rect x=\"1.75\" y=\"5.25\" width=\"9\" height=\"9\" rx=\"1\" stroke-width=\"1.33\" fill=\"none\"\/><\/svg>\r\n<\/span>Copy<\/button><\/div><pre><code class=\"hljs language-sh\">git branch --merged | grep -v \\* | xargs<\/code><\/pre><\/div><ol start=\"4\">\n<li>Feed these arguments to the deletion command (passed in the second argument of <span class=\"inline-code\">xargs<\/span>):<\/li>\n<\/ol>\n<div class=\"e2-code-block\" data-language=\"sh\"><div class=\"e2-code-header\"><span class=\"e2-code-language\">Shell<\/span><button class=\"e2-code-copy\" type=\"button\" aria-label=\"Copy code to clipboard\" data-copy-text=\"Copy\" data-copied-text=\"Copied!\" data-failed-text=\"Failed\"><span class=\"e2-svgi\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 16 16\"><mask id=\"cutout\"><rect width=\"100%\" height=\"100%\" fill=\"white\"\/><rect x=\"1.75\" y=\"5.25\" width=\"9\" height=\"9\" stroke-width=\"1.33\" rx=\"1\" fill=\"black\" stroke=\"black\"\/><\/mask><rect x=\"5.25\" y=\"1.75\" width=\"9\" height=\"9\" rx=\"1\" stroke-width=\"1.33\" fill=\"none\" mask=\"url(#cutout)\"\/><rect x=\"1.75\" y=\"5.25\" width=\"9\" height=\"9\" rx=\"1\" stroke-width=\"1.33\" fill=\"none\"\/><\/svg>\r\n<\/span>Copy<\/button><\/div><pre><code class=\"hljs language-sh\">git branch --merged | grep -v \\* | xargs git branch -D<\/code><\/pre><\/div>",
            "date_published": "2025-08-28T13:46:06+02:00",
            "date_modified": "2025-10-03T23:37:09+02:00",
            "tags": [
                "git",
                "guides",
                "shell"
            ],
            "_date_published_rfc2822": "Thu, 28 Aug 2025 13:46:06 +0200",
            "_rss_guid_is_permalink": "false",
            "_rss_guid": "11",
            "_rss_enclosures": [],
            "_e2_data": {
                "is_favourite": true,
                "links_required": [
                    "highlight\/highlight.js",
                    "highlight\/highlight.css"
                ],
                "og_images": []
            }
        }
    ],
    "_e2_version": 4134,
    "_e2_ua_string": "Aegea 11.3 (v4134e)"
}