{"id":529272,"date":"2022-12-19T21:00:00","date_gmt":"2022-12-19T18:00:00","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/how-to-rename-a-branch-in-git\/"},"modified":"2022-12-19T21:00:00","modified_gmt":"2022-12-19T18:00:00","slug":"how-to-rename-a-branch-in-git","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/how-to-rename-a-branch-in-git\/","title":{"rendered":"#How to Rename a Branch in Git"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a24c132db926\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a24c132db926\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-rename-a-branch-in-git\/#%E2%80%9CHow_to_Rename_a_Branch_in_Git%E2%80%9D\" >&#8220;How to Rename a Branch in Git&#8221;<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-rename-a-branch-in-git\/#Why_Branch_Names_Are_Important_in_Git\" >Why Branch Names Are Important in Git<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-rename-a-branch-in-git\/#List_Branches_in_Git_Before_Renaming_Them\" >List Branches in Git Before Renaming Them<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-rename-a-branch-in-git\/#How_to_Rename_a_Local_Branch_in_Git\" >How to Rename a Local Branch in Git<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-rename-a-branch-in-git\/#How_to_Rename_a_Remote_Branch_in_Git\" >How to Rename a Remote Branch in Git<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-rename-a-branch-in-git\/#Renaming_Branches_Is_Simple\" >Renaming Branches Is Simple<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"%E2%80%9CHow_to_Rename_a_Branch_in_Git%E2%80%9D\"><\/span>&#8220;How to Rename a Branch in Git&#8221;<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<div>\n<img loading=\"lazy\" decoding=\"async\" class=\"type:primaryImage alignnone size-full wp-image-759896\" data-pagespeed-no-defer=\"\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/10\/git-logo-blue-background.jpg?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Git logo on a blue background\" width=\"1200\" height=\"675\"\/><\/p>\n<p>To rename the current, local branch use &#8220;git branch -m new-name.&#8221; To rename a local branch from inside another, use &#8220;git branch -m old-name new-name.&#8221; To rename a remote branch, delete it with &#8220;git push origin &#8211;delete old-name&#8221;, then push the renamed local branch with &#8220;git push origin -u new-name.&#8221;<\/p>\n<p>Branching is a trivial exercise in Git. Unfortunately, trivial tasks rarely get due attention, and mistakes h<a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">app<\/a>en. If you\u2019ve misnamed a branch, it\u2019ll have to be renamed. Here\u2019s how to do that.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Why_Branch_Names_Are_Important_in_Git\"><\/span>Why Branch Names Are Important in Git<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Anything to do with branches in classic version control systems (VCSs) was a big deal. It required a coordinated understanding that a branch was being added or merged, and all of the people using that repository had to make sure they didn\u2019t do anything\u2014or forget to do something\u2014in order for the operation to proceed and succeed.<\/p>\n<p>Operations involving branches were often very slow, too. There was a time penalty top using branches.\u00a0Git was designed from the get-go to be different. Because it is a distributed version control system, every user has a copy of the full repository on their local machine.<\/p>\n<p>Branching on your local machine doesn\u2019t affect anyone else unless you push the branch to a remote repository.\u00a0And in Git, branch operations are designed to be as easy to use as they are fast to complete. Branching in Git is very cheap in computational terms. It is a trivial action inside the local repository.<\/p>\n<p>In fact, developers are encouraged to branch, and to branch often. Branches are just another tool inside your VCS that you benefit from. Branches aren\u2019t big scary things in Git, they\u2019re one of its most used features.<\/p>\n<p>But familiarity can lead to contempt. Or, at least, to a casual regard for branches. Branching might be quick and simple in Git, but you still need to be focused when you create a branch. It\u2019s easy to mistype a branch name, or type the wrong name, resulting in a badly-named branch.<\/p>\n<p>If the branch is going to be pushed to the remote repository at some point, it needs be correctly spelled. If it isn\u2019t, it\u2019ll cause confusion when others try to use it.<\/p>\n<p><strong>RELATED:<\/strong> <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.howtogeek.com\/devops\/how-do-git-branches-work\/\"><strong><em>How Do Git Branches Work?<\/em><\/strong><\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"List_Branches_in_Git_Before_Renaming_Them\"><\/span>List Branches in Git Before Renaming Them<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Checking what the current branch names are is a good first step. The <code>git branch<\/code> command lists branches for us. You can see the branches in the local repository with this command:<\/p>\n<pre>git branch<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-851427\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/11\/1-6.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Listing local branches using the git branch command\" width=\"644\" height=\"150\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>The branches are listed for us. The current branch is highlighted in green, and with an asterisk.<\/p>\n<p>To see the branches and their commits, you can use the <code>show-branch<\/code> command.<\/p>\n<pre>git show-branch<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-851428\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/11\/2-5.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Listing branches and their commits with the git show-branch command\" width=\"644\" height=\"250\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>You can see the branches on the remote repository by including the -r (remote) option.<\/p>\n<pre>git branch -r<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-851429\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/11\/3-4.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Listing remote branches with the git branch -r command\" width=\"644\" height=\"150\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>To see local and remote branches with one command, use the <code>-a<\/code> (all) option.<\/p>\n<pre>git branch -a<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-851431\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/11\/4-3.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Listing local and remote branches with the git branch -a command\" width=\"644\" height=\"230\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>We have more local branches than we have remote branches. Branch \u201cfeature16\u201d hasn\u2019t been pushed to the remote repository yet. That\u2019s just an aspect of normal operation, not a problem.<\/p>\n<p>Our problem is branch \u201cfeature19\u201d should have been named \u201cfeature18.\u201d\u00a0So that\u2019s the mistake we\u2019re going to correct.<\/p>\n<p><strong>RELATED:<\/strong> <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.howtogeek.com\/devops\/how-to-update-and-maintain-separate-git-branches\/\"><strong><em>How To Update and Maintain Separate Git Branches<\/em><\/strong><\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"How_to_Rename_a_Local_Branch_in_Git\"><\/span>How to Rename a Local Branch in Git<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>There are two ways you can rename a branch locally. You can checkout the branch and rename it, or you can rename the branch while you\u2019re working in some other branch.<\/p>\n<p>To rename the <em>current<\/em> branch, make sure you\u2019ve checked out and are using the branch you want to rename. Then use the <code>git branch<\/code> command with the <code>-m<\/code> (move) option.<\/p>\n<pre>git checkout feature19<\/pre>\n<pre>git branch -m feature18<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-851433 size-full\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/11\/5-4.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Checking out branch &quot;feature19&quot; and renaming it\" width=\"644\" height=\"130\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>We checked out the \u201cfeature19\u201d branch and renamed it to \u201cfeature18.\u201d Let\u2019s see what our branches look like now.<\/p>\n<pre>git branch<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-851434\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/11\/6-4.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Listing branches to check that branch &quot;feature19&quot; has been renamed to &quot;feature18&quot;\" width=\"644\" height=\"150\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Our branch now has the correct name in the local repository.<\/p>\n<p>If you want to, you can rename a branch when you\u2019re working in another branch. Here\u2019s an example where we\u2019re working in the \u201cmaster\u201d branch.<\/p>\n<pre>git branch<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-851436\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/11\/7-4.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Listing branches to check we're on the master branch\" width=\"644\" height=\"150\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>The command we use is the same command as before, but we need to provide the current name for the branch we\u2019re renaming, as well as the new name we want it to have.<\/p>\n<pre>git branch -m feature19 feature18<\/pre>\n<pre>git branch<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-851439\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/11\/9-4.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Renaming one branch from inside another branch\" width=\"644\" height=\"170\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Again, the branch in our local repository has been renamed with the correct name.<\/p>\n<p><strong>RELATED:<\/strong> <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.howtogeek.com\/714112\/how-to-create-a-new-branch-in-github\/\"><strong><em>How to Create a New Branch in GitHub<\/em><\/strong><\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"How_to_Rename_a_Remote_Branch_in_Git\"><\/span>How to Rename a Remote Branch in Git<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The remote repository still holds the branch with the old name. To rename a remote branch, we delete the old branch and push the new branch.<\/p>\n<p>If other users use this branch and push commits to it, you should do a pull before you rename it locally. This ensures your local repository is up to date and that changes made by other users won\u2019t be lost. Pulling their changes back to your repository before you rename the branch locally, means those changes will be in the new branch when you push it back to the remote repository.<\/p>\n<p>Let\u2019s take a look at the state of our branches. We\u2019ll use the <code>-a<\/code> (all) option to see both the local and the remote branches.<\/p>\n<pre>git branch -a<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-851440\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/11\/10-3.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Listing local and remote branches with the git branch -a command\" width=\"644\" height=\"230\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>We need to delete \u201cfeature19\u201d from the remote repository, and push \u201cfeature18\u201d to the remote.<\/p>\n<pre>git push origin --delete feature19<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-851441\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/11\/11-3.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Deleting a remote branch using the git the --delete option\" width=\"644\" height=\"130\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>You\u2019ll be prompted for the password for the remote repository. Once the deletion has taken place you\u2019ll see a confirmation message.<\/p>\n<p>Now we\u2019ll push our new branch to the remote, and use the -u (set upstream) option<\/p>\n<pre>git push origin -u feature18<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-851442\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/11\/12-3.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Pushing a branch to the remote repository\" width=\"644\" height=\"335\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Again, you\u2019ll be prompted for your password for the remote. The new branch is pushed to the remote, and we\u2019re told that branch \u201cfeature18\u201d is set up to track changes in our local copy of the branch.<\/p>\n<p>Let\u2019s check once more what state our local and remote branches are in.<\/p>\n<pre>git branch -a<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-851443\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/11\/13-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Listing local and remote branches with the git branch -a command\" width=\"644\" height=\"230\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Our branch has been successfully renamed both locally and remotely, and the remote branch is tracking the changes in our local branch.<\/p>\n<p><strong>RELATED:<\/strong> <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.howtogeek.com\/devops\/how-to-delete-git-branches-on-local-and-remote-repositories\/\"><strong><em>How to Delete Git Branches On Local and Remote Repositories<\/em><\/strong><\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Renaming_Branches_Is_Simple\"><\/span>Renaming Branches Is Simple<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>With Git, renaming branches is simple. If you\u2019re the only person who uses a repository or branch that needs renaming, it is very simple.<\/p>\n<p>If others share the branch, make sure you communicate to them that you\u2019re going to rename the branch, and that they should push any uncommitted work. When they\u2019ve pushed, you can pull the branch, then rename your branch locally and remotely.<\/p>\n<p><strong>RELATED:<\/strong> <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.howtogeek.com\/devops\/how-to-use-git-with-multiple-remote-repositories\/\"><strong><em>How To Use git with Multiple Remote Repositories<\/em><\/strong><\/p>\n<\/div>\n<p><script>\n setTimeout(function(){\n  !function(f,b,e,v,n,t,s)\n  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n  n.callMethod.apply(n,arguments):n.queue.push(arguments)};\n  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n  n.queue=[];t=b.createElement(e);t.async=!0;\n  t.src=v;s=b.getElementsByTagName(e)[0];\n  s.parentNode.insertBefore(t,s) } (window, document,'script',\n  'https:\/\/connect.facebook.net\/en_US\/fbevents.js');\n   fbq('init', '335401813750447');\n   fbq('track', 'PageView');\n  },3000);\n<\/script><\/p>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.howtogeek.com\/851425\/git-rename-branch\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;How to Rename a Branch in Git&#8221; To rename the current, local branch use &#8220;git branch -m new-name.&#8221; To rename a local branch from inside another, use &#8220;git branch -m old-name new-name.&#8221; To rename a remote branch, delete it with &#8220;git push origin &#8211;delete old-name&#8221;, then push the renamed local branch with &#8220;git push origin&#8230;<\/p>\n","protected":false},"author":1,"featured_media":529273,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/10\/git-logo-blue-background.jpg?height=200p&trim=2,2,2,2","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-529272","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/529272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=529272"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/529272\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/529273"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=529272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=529272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=529272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}