{"id":2479,"date":"2022-04-13T11:48:09","date_gmt":"2022-04-13T02:48:09","guid":{"rendered":"https:\/\/rageworx.info\/?p=2479"},"modified":"2022-04-13T11:48:09","modified_gmt":"2022-04-13T02:48:09","slug":"case-of-git-error-refusing-to-delete-the-current-branch","status":"publish","type":"post","link":"https:\/\/rageworx.info\/?p=2479","title":{"rendered":"Case of git error: refusing to delete the current branch"},"content":{"rendered":"<p>Some people, like me, may sometimes trying to move to &#8216;Bitbucket&#8217; repository from &#8216;GitHub&#8217; by any private reason to prevent steal source codes to M$.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2482\" src=\"https:\/\/rageworx.info\/wp-content\/uploads\/2022\/04\/git_mirrot_error_01.jpg\" alt=\"\" width=\"581\" height=\"97\" \/><\/p>\n<blockquote><p>error: refusing to delete the current branch<\/p><\/blockquote>\n<p>Because GitHub doesn&#8217;t like these legacy words, &#8216;master&#8217; and &#8216;slave&#8217; as default repository branch name, but BitBucket still follows legacy naming of default branch. Just need to go to configuration page, and change default main branch name to &#8216;main&#8217; from &#8216;master&#8217;.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2481\" src=\"https:\/\/rageworx.info\/wp-content\/uploads\/2022\/04\/bitbucket_solve_1.jpg\" alt=\"\" width=\"704\" height=\"385\" srcset=\"https:\/\/rageworx.info\/wp-content\/uploads\/2022\/04\/bitbucket_solve_1.jpg 704w, https:\/\/rageworx.info\/wp-content\/uploads\/2022\/04\/bitbucket_solve_1-624x341.jpg 624w\" sizes=\"auto, (max-width: 704px) 100vw, 704px\" \/><\/p>\n<p>Then try to push mirror repository again, it will be succeeded.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some people, like me, may sometimes trying to move to &#8216;Bitbucket&#8217; repository from &#8216;GitHub&#8217; by any private reason to prevent steal source codes to M$. error: refusing to delete the current branch Because GitHub doesn&#8217;t like these legacy words, &#8216;master&#8217; and &#8216;slave&#8217; as default repository branch name, but BitBucket still&#8230; <a href=\"https:\/\/rageworx.info\/?p=2479\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":2483,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,3,640],"tags":[756,70,754,757,755],"class_list":["post-2479","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development","category-raphs","category-tips","tag-clone","tag-error","tag-git","tag-how2fix","tag-mirror"],"_links":{"self":[{"href":"https:\/\/rageworx.info\/index.php?rest_route=\/wp\/v2\/posts\/2479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rageworx.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rageworx.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rageworx.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rageworx.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2479"}],"version-history":[{"count":0,"href":"https:\/\/rageworx.info\/index.php?rest_route=\/wp\/v2\/posts\/2479\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rageworx.info\/index.php?rest_route=\/wp\/v2\/media\/2483"}],"wp:attachment":[{"href":"https:\/\/rageworx.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2479"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rageworx.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2479"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rageworx.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}