{"id":541974,"date":"2023-01-21T20:00:01","date_gmt":"2023-01-21T17:00:01","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/how-to-checkout-a-remote-git-branch\/"},"modified":"2023-01-21T20:00:01","modified_gmt":"2023-01-21T17:00:01","slug":"how-to-checkout-a-remote-git-branch","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/how-to-checkout-a-remote-git-branch\/","title":{"rendered":"#How to Checkout a Remote Git Branch"},"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-6a26bd9f38717\" 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-6a26bd9f38717\" 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-checkout-a-remote-git-branch\/#%E2%80%9CHow_to_Checkout_a_Remote_Git_Branch%E2%80%9D\" >&#8220;How to Checkout a Remote Git Branch&#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-checkout-a-remote-git-branch\/#Git_Branches_and_Remotes\" >Git, Branches, and Remotes<\/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-checkout-a-remote-git-branch\/#Finding_Your_Local_Branches\" >Finding Your Local Branches<\/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-checkout-a-remote-git-branch\/#Checking_Out_a_Remote_Branch\" >Checking Out a Remote Branch<\/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-checkout-a-remote-git-branch\/#Handling_Name_Clashes\" >Handling Name Clashes<\/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-checkout-a-remote-git-branch\/#Handling_Multiple_Remote_Repositories\" >Handling Multiple Remote Repositories<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-checkout-a-remote-git-branch\/#Before_You_Checkout\" >Before You Checkout<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"%E2%80%9CHow_to_Checkout_a_Remote_Git_Branch%E2%80%9D\"><\/span>&#8220;How to Checkout a Remote Git Branch&#8221;<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<div>\n<!-- UNCACHED CONTENT --><\/p>\n<figure style=\"width: 1200px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"type:primaryImage size-full wp-image-791996\" data-pagespeed-no-defer=\"\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/03\/shutterstock_321627716.png?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Linux laptop showing a bash prompt\" width=\"1200\" height=\"675\"\/><figcaption class=\"wp-caption-text\"><span class=\"type:primaryImage imagecredit\"><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.shutterstock.com\/image-vector\/linux-interface-screen-notebook-world-map-321627716\">fatmawati achmad zaenuri\/Shutterstock.com<\/a><\/span><\/figcaption><\/figure>\n<p>To checkout a branch from a remote repository, use the &#8216;git fetch&#8217; command, and then &#8216;git branch -r&#8217; to list the remote branches. Pick the branch you need and use a command of the form &#8216;git checkout -b new-branch-name origin\/remote-branch-name.&#8217; If you use multiple repositories change the &#8216;origin&#8217; part of the checkout command to the name of the remote you wish to checkout the branch from.<\/p>\n<p>If your development team uses Git, you\u2019ll eventually need to check out someone else\u2019s work as a branch from a remote repository. Like most branch actions in Git, switching to a remote branch is actually quite simple.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Git_Branches_and_Remotes\"><\/span><a rel=\"nofollow noopener\" target=\"_blank\" name=\"autotoc_anchor_0\">Git, Branches, and Remotes<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/git-scm.com\/\">Git<\/a> philosophy is to branch often. Branches allow development to take place without altering the main code base. When you are satisfied that your new, tested code is ready, you merge your new branch into another branch. Usually, this is the main or master branch, but you can merge any two branches.<\/p>\n<p>Because of this flexibility, and the lightweight and fast way that Git handles branches and merges, branching was transformed. In older version control systems, branching was a big deal. Branching and merging were slow and error-prone. Git gave developers easy, fast branching that\u2019s used to underpin many different workflows.<\/p>\n<p>If you work or volunteer as part of a development team using Git, you\u2019ll have a \u201ccentral\u201d Git repository, remote from each software engineer\u2019s computer. This is known as the remote repository, or just the \u201cremote.\u201d It\u2019s where the commits and changes to your local repository get sent when you perform a push.<\/p>\n<p>Of course, that\u2019s what the other developers are doing, too. This makes it easy to collaborate. If you need to access another developer\u2019s work, you just retrieve their code from a branch on the remote repository. If they need to access your work, they\u2019ll retrieve your code from a branch on the repository that tracks one of your local branches.<\/p>\n<p>In Git, a development project can have multiple remotes. However, a local branch can only track a single remote branch. So, as long as you are working with the appropriate remote, checking out a remote branch with multiple remotes is the same as using a single remote.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Finding_Your_Local_Branches\"><\/span>Finding Your Local Branches<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You need to avoid name conflicts. If you have a local branch that happens to have the same name as the remote branch you are going to check out, you have two options. You can rename your local branch and check out the remote branch. That way, your local branch that tracks the remote branch has the same name as the remote branch. Or, you can checkout the remote branch and tell Git to create a local tracking branch with a new name.<\/p>\n<p>To find out the names of the branches in your local repository, use the <code>git branch<\/code> command.<\/p>\n<pre>git branch<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-864265\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/01\/1-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Listing local branches with the git branch command\" width=\"644\" height=\"160\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>This local repository has a master branch and three other branches. The asterisk indicates which is the current branch. Moving from branch to branch requires checking out the branch you want to work with.<\/p>\n<pre>git checkout new-feature<\/pre>\n<pre>git status<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-864267\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/01\/2-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Checking out a local branch with the git checkout 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 first command changes the branch for us, so that \u201cnew-feature\u201d is the current branch. The <code>git status <\/code> command verifies that for us.<\/p>\n<p>We can hop back and forth between branches, committing new changes, pulling updates from the remote, and pushing local updates to the remote.<\/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=\"Checking_Out_a_Remote_Branch\"><\/span>Checking Out a Remote Branch<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>There\u2019s a branch on the remote repository that isn\u2019t present on our machine. A developer called Mary has created a new feature. We want to switch to that remote branch so we can build that version of the software locally.<\/p>\n<p>If we perform a <code>fetch<\/code>, Git will pull back the metadata from the remote repository.<\/p>\n<pre>git fetch<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-864268\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/01\/3-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Using the git fetch command to retrieve the metadata about a remote repository\" 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>Because this is the first <code>fetch<\/code> we\u2019ve done since Mary pushed her branch to the remote repository, We\u2019re told there is a <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.howtogeek.com\/714112\/how-to-create-a-new-branch-in-github\/\">new branch called \u201corigin\/mary-feature.\u201d The default name for the first remote repository added to a project is \u201corigin.\u201d<\/p>\n<p>Whether we see this message or not, we can always ask Git to list the branches in the remote repository.<\/p>\n<p>The <code>-r<\/code> (remote) option tells Git to report on the branches that are on the remote repository.<\/p>\n<pre>git branch -r<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-864269\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/01\/4-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Using the git branch -r command to list remote branches\" 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>The point to note here is that Git is checking its <em>local<\/em> copy of the remote\u2019s metadata. That\u2019s why we used the <code>git fetch<\/code> command to make sure the local copy of the metadata is up to date.<\/p>\n<p>Once we spot the branch we want, we can go ahead and check it out.\u00a0We use the <code>git checkout<\/code> command with the <code>-b<\/code> (branch) option, followed by the name we\u2019ll use for the local branch, followed by the name of the remote branch.<\/p>\n<pre>git checkout -b mary-feature origin\/mary-feature<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-864270\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/01\/5-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Checking out a remote branch with the git checkout -b command\" 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 can see that we\u2019ve checked out the remote branch and created a local branch that will track changes in the remote branch.<\/p>\n<pre>git branch<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-864271\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/01\/6-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Listing local branches with the git branch command, with the newly created copy of the remote branch selected as the current 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>Our new local branch is now our current working branch.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Handling_Name_Clashes\"><\/span>Handling Name Clashes<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If you have a local branch that has the same name as the remote branch, you can either rename your local branch before checking out the remote branch, or checkout the remote branch and specify a different local branch name.<\/p>\n<p>To checkout the remote branch into a differently-named local branch, we can use the same command we used earlier, and choose a new local branch name.<\/p>\n<pre>git checkout -b mary-test origin\/mary-feature<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-864272\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/01\/7-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Checking out a remote branch with the git checkout -b command with the local branch having a different name to the remote branch\" 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>This creates a local branch called \u201cmary-test\u201d that will track local commits to that branch. Pushes will go to the remote \u201corigin\/mary-feature\u201d branch.<\/p>\n<p>This is probably the best way to handle local name clashes. If you really want to keep the name of the local and remote branch the same, you\u2019ll need to rename your local branch before checking out the remote.\u00a0<a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.howtogeek.com\/851425\/git-rename-branch\/\">Renaming a branch is trivial in Git.<\/p>\n<pre>git branch -m mary-feature old-mary-branch<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-864273\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/01\/8-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Renaming a branch with the git branch -m command\" width=\"644\" height=\"75\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>You\u2019re now clear to checkout the remote \u201corigin\/mary-feature\u201d branch.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Handling_Multiple_Remote_Repositories\"><\/span>Handling Multiple Remote Repositories<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If you have multiple remote repositories configured, you need to take care you are working with the appropriate repository when you check out the remote branch.<\/p>\n<p>To list your remote repositories, use the <code>remote<\/code> command with the <code>-v<\/code> (view) option.<\/p>\n<pre>git remote -v<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-864274\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/01\/9-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Listing remote repositories with the git remote -v 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 all the available branches, we need to fetch the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.howtogeek.com\/815069\/what-is-metadata\/\">metadata from all our remotes, then list the remote branches.<\/p>\n<pre>git fetch --all<\/pre>\n<pre>git branch --all<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-864275\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/01\/10-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Using git fetch --all to update the local metadata and using git branch --all to list all branches, local and remote\" width=\"644\" height=\"295\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>We can see the branch we want is in the \u201corigin\u201d remote. The command to check it out is in the same format we\u2019ve already used. We need to specify the remote name, \u201corigin\u201d, as well as the branch name, \u201cmary-feature.\u201d<\/p>\n<pre>git checkout -b mary-feature origin\/mary-feature<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-864276\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/01\/11-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Checking out a remote branch with the git checkout -b command, using the remote name and the branch name\" width=\"638\" height=\"130\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p><strong>RELATED:<\/strong> <strong><em>How to Switch, Add, and Remove Git Remotes<\/em><\/strong><\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Before_You_Checkout\"><\/span>Before You Checkout<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Before you checkout keep a few things in mind, and you\u2019ll be fine.<\/p>\n<p>Make sure you avoid name clashes. If you have a local branch with the same name as the remote branch, decide whether you\u2019ll rename the local branch or create a branch with a different name to track the remote branch.<\/p>\n<p>If you use multiple remote repositories, make sure you use the correct remote.<\/p>\n<p><strong>RELATED:<\/strong> <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.howtogeek.com\/849210\/git-rebase\/\"><strong><em>Git rebase: Everything You Need to Know<\/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\/864263\/how-to-checkout-a-remote-git-branch\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;How to Checkout a Remote Git Branch&#8221; fatmawati achmad zaenuri\/Shutterstock.com To checkout a branch from a remote repository, use the &#8216;git fetch&#8217; command, and then &#8216;git branch -r&#8217; to list the remote branches. Pick the branch you need and use a command of the form &#8216;git checkout -b new-branch-name origin\/remote-branch-name.&#8217; If you use multiple repositories&#8230;<\/p>\n","protected":false},"author":1,"featured_media":541975,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/03\/shutterstock_321627716.png?height=200p&trim=2,2,2,2","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-541974","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\/541974","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=541974"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/541974\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/541975"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=541974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=541974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=541974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}