{"id":101,"date":"2012-07-05T09:27:09","date_gmt":"2012-07-05T09:27:09","guid":{"rendered":"http:\/\/finaldie.com\/wordpress\/?p=101"},"modified":"2012-11-05T05:03:12","modified_gmt":"2012-11-05T05:03:12","slug":"how-to-clear-the-git-branch-list","status":"publish","type":"post","link":"https:\/\/finaldie.com\/blog\/how-to-clear-the-git-branch-list\/","title":{"rendered":"How to clear the git branch list"},"content":{"rendered":"<p>There is a case, we create a remote branch named &#8220;test&#8221;, and we delete it after we recognize it un-useful. But we take a look at our branch list ( through &#8220;git branch -a&#8221; ), the branch name has already shown in the list, which has been deleted before.<\/p>\n<p>That will be mislead us, we need to clear the branch list. So there is a command:&#8221;<em><strong>git remote prune origin<\/strong><\/em>&#8220;,\u00a0the <strong>&#8220;origin&#8221; <\/strong>is our\u00a0repository name.<\/p>\n<p>After all, the world has been cleaned. :D have a fun~<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There is a case, we create a remote branch named &#8220;test&#8221;, and we delete it after we recognize it un-useful. But we take a look at our branch list ( through &#8220;git branch -a&#8221; ), the branch name has already shown in the list, which has been deleted before. That will be mislead us, we &#8230; <a title=\"How to clear the git branch list\" class=\"read-more\" href=\"https:\/\/finaldie.com\/blog\/how-to-clear-the-git-branch-list\/\" aria-label=\"More on How to clear the git branch list\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to clear the git branch list - Final Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/finaldie.com\/blog\/how-to-clear-the-git-branch-list\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to clear the git branch list - Final Blog\" \/>\n<meta property=\"og:description\" content=\"There is a case, we create a remote branch named &#8220;test&#8221;, and we delete it after we recognize it un-useful. But we take a look at our branch list ( through &#8220;git branch -a&#8221; ), the branch name has already shown in the list, which has been deleted before. That will be mislead us, we ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/finaldie.com\/blog\/how-to-clear-the-git-branch-list\/\" \/>\n<meta property=\"og:site_name\" content=\"Final Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hu.yuzhang\" \/>\n<meta property=\"article:published_time\" content=\"2012-07-05T09:27:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-11-05T05:03:12+00:00\" \/>\n<meta name=\"author\" content=\"final\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hyzwowtools\" \/>\n<meta name=\"twitter:site\" content=\"@hyzwowtools\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"final\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/finaldie.com\/blog\/how-to-clear-the-git-branch-list\/\",\"url\":\"https:\/\/finaldie.com\/blog\/how-to-clear-the-git-branch-list\/\",\"name\":\"How to clear the git branch list - Final Blog\",\"isPartOf\":{\"@id\":\"https:\/\/finaldie.com\/blog\/#website\"},\"datePublished\":\"2012-07-05T09:27:09+00:00\",\"dateModified\":\"2012-11-05T05:03:12+00:00\",\"author\":{\"@id\":\"https:\/\/finaldie.com\/blog\/#\/schema\/person\/2d4c840d6e8e197f8ade98af2bd2fab3\"},\"breadcrumb\":{\"@id\":\"https:\/\/finaldie.com\/blog\/how-to-clear-the-git-branch-list\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/finaldie.com\/blog\/how-to-clear-the-git-branch-list\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/finaldie.com\/blog\/how-to-clear-the-git-branch-list\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/finaldie.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to clear the git branch list\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/finaldie.com\/blog\/#website\",\"url\":\"https:\/\/finaldie.com\/blog\/\",\"name\":\"Final Blog\",\"description\":\"As simple as possible...\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/finaldie.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/finaldie.com\/blog\/#\/schema\/person\/2d4c840d6e8e197f8ade98af2bd2fab3\",\"name\":\"final\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/finaldie.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4c720545b79ddb0f23b527e0bbcfd9bc?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4c720545b79ddb0f23b527e0bbcfd9bc?s=96&r=g\",\"caption\":\"final\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to clear the git branch list - Final Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/finaldie.com\/blog\/how-to-clear-the-git-branch-list\/","og_locale":"en_US","og_type":"article","og_title":"How to clear the git branch list - Final Blog","og_description":"There is a case, we create a remote branch named &#8220;test&#8221;, and we delete it after we recognize it un-useful. But we take a look at our branch list ( through &#8220;git branch -a&#8221; ), the branch name has already shown in the list, which has been deleted before. That will be mislead us, we ... Read more","og_url":"https:\/\/finaldie.com\/blog\/how-to-clear-the-git-branch-list\/","og_site_name":"Final Blog","article_publisher":"https:\/\/www.facebook.com\/hu.yuzhang","article_published_time":"2012-07-05T09:27:09+00:00","article_modified_time":"2012-11-05T05:03:12+00:00","author":"final","twitter_card":"summary_large_image","twitter_creator":"@hyzwowtools","twitter_site":"@hyzwowtools","twitter_misc":{"Written by":"final"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/finaldie.com\/blog\/how-to-clear-the-git-branch-list\/","url":"https:\/\/finaldie.com\/blog\/how-to-clear-the-git-branch-list\/","name":"How to clear the git branch list - Final Blog","isPartOf":{"@id":"https:\/\/finaldie.com\/blog\/#website"},"datePublished":"2012-07-05T09:27:09+00:00","dateModified":"2012-11-05T05:03:12+00:00","author":{"@id":"https:\/\/finaldie.com\/blog\/#\/schema\/person\/2d4c840d6e8e197f8ade98af2bd2fab3"},"breadcrumb":{"@id":"https:\/\/finaldie.com\/blog\/how-to-clear-the-git-branch-list\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/finaldie.com\/blog\/how-to-clear-the-git-branch-list\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/finaldie.com\/blog\/how-to-clear-the-git-branch-list\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/finaldie.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to clear the git branch list"}]},{"@type":"WebSite","@id":"https:\/\/finaldie.com\/blog\/#website","url":"https:\/\/finaldie.com\/blog\/","name":"Final Blog","description":"As simple as possible...","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/finaldie.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/finaldie.com\/blog\/#\/schema\/person\/2d4c840d6e8e197f8ade98af2bd2fab3","name":"final","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/finaldie.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4c720545b79ddb0f23b527e0bbcfd9bc?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4c720545b79ddb0f23b527e0bbcfd9bc?s=96&r=g","caption":"final"}}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/posts\/101"}],"collection":[{"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/comments?post=101"}],"version-history":[{"count":4,"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/posts\/101\/revisions"}],"predecessor-version":[{"id":110,"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/posts\/101\/revisions\/110"}],"wp:attachment":[{"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/media?parent=101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/categories?post=101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/tags?post=101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}