{"id":17824,"date":"2024-09-10T09:27:13","date_gmt":"2024-09-10T09:27:13","guid":{"rendered":"http:\/\/www.max-sperling.bplaced.net\/?p=17824"},"modified":"2024-09-10T09:36:45","modified_gmt":"2024-09-10T09:36:45","slug":"rename-a-branch-git","status":"publish","type":"post","link":"http:\/\/www.max-sperling.bplaced.net\/?p=17824","title":{"rendered":"Rename a branch (Git)"},"content":{"rendered":"<p><strong>0. Preparation<\/strong><\/p>\n<pre>\r\nCheckout the branch you want to rename.\r\n<\/pre>\n<p><strong>1. Rename local<\/strong><\/p>\n<pre>\r\n$ git branch -m new-branch-name\r\n<\/pre>\n<p><strong>2. Change remote<\/strong><\/p>\n<pre>\r\n$ git push origin :old-branch-name new-branch-name\r\n<\/pre>\n<p><strong>3. Update upstream<\/strong><\/p>\n<pre>\r\n$ git push origin -u new-branch-name\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>0. Preparation Checkout the branch you want to rename. 1. Rename local $ git branch -m new-branch-name 2. Change remote<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false},"categories":[24],"tags":[],"_links":{"self":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/17824"}],"collection":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=17824"}],"version-history":[{"count":8,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/17824\/revisions"}],"predecessor-version":[{"id":17832,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/17824\/revisions\/17832"}],"wp:attachment":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=17824"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=17824"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=17824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}