{"id":1500,"date":"2019-11-14T20:00:39","date_gmt":"2019-11-15T02:00:39","guid":{"rendered":"https:\/\/www.ciraltos.com\/?p=1500"},"modified":"2023-03-23T22:43:57","modified_gmt":"2023-03-24T03:43:57","slug":"git-for-the-lone-scripter-fork-branch-merge","status":"publish","type":"post","link":"https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/","title":{"rendered":"Git for the Lone Scripter &#8211; Fork, Branch &#038; Merge"},"content":{"rendered":"\n<figure class=\"wp-block-image alignleft\"><img decoding=\"async\" src=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/10\/git.png\" alt=\"\" class=\"wp-image-1369\"\/><\/figure>\n\n\n\n<p>In my first post, I made the bold statement that I would leave Branch and Fork out of this series because as a Sysadmin and loan scripter, I simply don\u2019t need that functionality.&nbsp; However, I didn\u2019t feel that this would be a complete series on Git if I didn\u2019t spend some time on Git Branch and Fork.&nbsp; At a minimum, it is helpful to understand what it is and how it works.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>Click <a href=\"https:\/\/www.ciraltos.com\/git-for-system-admin-scripting\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"here  (opens in a new tab)\">here <\/a>to see other articles in this series.<\/p>\n\n\n\n<h2>Fork<\/h2>\n\n\n\n<p>First up is Fork.&nbsp; Think of a Fork as a fork in a road, a single\npath that splits and goes to two different destinations.&nbsp; In literal terms, a Fork creates a new\nrepository based on other projects commit.&nbsp;\nIf you find an interesting script on GitHub and wanted to copy and\nupdate it for your environment, forking the code would accomplish that goal. <\/p>\n\n\n\n<p>Each dot in the\nimage below references a commit.&nbsp; For\nexample, the first dot is code for a generic web server.&nbsp; Fred forks the code and builds a web\nsite.&nbsp; Jane does the same and commits and\nadditional update.&nbsp; Fred and Janes don\u2019t\nknow each other or plan to ever merge their web sites.&nbsp; They simply started with the same web server\ncode.<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><a href=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Fork-Overview.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Fork-Overview.png\" alt=\"\" class=\"wp-image-1501\" width=\"329\" height=\"193\" srcset=\"https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Fork-Overview.png 439w, https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Fork-Overview-300x176.png 300w\" sizes=\"(max-width: 329px) 100vw, 329px\" \/><\/a><figcaption class=\"wp-element-caption\"> Fork Overview <\/figcaption><\/figure>\n\n\n\n<p>As a demonstration,\nI fork a sample GitHub repository.&nbsp; The\nactual repository is not as important as the process.&nbsp; Start by logging into GitHub and finding the\nrepository to Fork.&nbsp; In the upper right-hand\nside of GitHub is a Fork icon, click that to start the process.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Fork-Repo.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" loading=\"lazy\" width=\"994\" height=\"243\" src=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Fork-Repo.png\" alt=\"\" class=\"wp-image-1502\" srcset=\"https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Fork-Repo.png 994w, https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Fork-Repo-300x73.png 300w, https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Fork-Repo-768x188.png 768w\" sizes=\"(max-width: 994px) 100vw, 994px\" \/><\/a><figcaption class=\"wp-element-caption\"> Fork Repo <\/figcaption><\/figure>\n\n\n\n<p>A message appears indicating\nthe Repo is being Forked.&nbsp; <\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><a href=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Forking-the-Repo.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Forking-the-Repo.png\" alt=\"\" class=\"wp-image-1504\" width=\"354\" height=\"151\" srcset=\"https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Forking-the-Repo.png 707w, https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Forking-the-Repo-300x128.png 300w\" sizes=\"(max-width: 354px) 100vw, 354px\" \/><\/a><figcaption class=\"wp-element-caption\"> Forking the Repo <\/figcaption><\/figure>\n\n\n\n<p>Now the Repository\nis part of my account.&nbsp; I can clone,\nupdate and commit just as with any other Repository.<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><a href=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Forked-Repo.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Forked-Repo.png\" alt=\"\" class=\"wp-image-1505\" width=\"302\" height=\"282\" srcset=\"https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Forked-Repo.png 403w, https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Forked-Repo-300x280.png 300w\" sizes=\"(max-width: 302px) 100vw, 302px\" \/><\/a><figcaption class=\"wp-element-caption\">Forked Repo<\/figcaption><\/figure>\n\n\n\n<p>Below shows a new\ncommit added to the Forked Repository. &nbsp;Notice that all the past history is still part\nof the repository, but only changes to my forked repository will show going\nforward.<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><a href=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Forked-Repo-Commit.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Forked-Repo-Commit.png\" alt=\"\" class=\"wp-image-1506\" width=\"461\" height=\"235\" srcset=\"https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Forked-Repo-Commit.png 921w, https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Forked-Repo-Commit-300x153.png 300w, https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Forked-Repo-Commit-768x392.png 768w\" sizes=\"(max-width: 461px) 100vw, 461px\" \/><\/a><figcaption class=\"wp-element-caption\"> Forked Repo Commit <\/figcaption><\/figure>\n\n\n\n<h2>Branch<\/h2>\n\n\n\n<p>Sticking to the\nroad analogy, think of a Branch as a detour.&nbsp;\nIt may split from the source path for a while, but the intent is that it\nwill merge back eventually. &nbsp;A Branch\nstarts at a commit of the Master Branch.&nbsp;\nFor example, Let\u2019s say there was a script that saves a CSV file to the\nlocal drive.&nbsp; It works, but it would be\nbetter if it sent the file by email.&nbsp;\nYou, or someone else, could create a Branch to add a function to send the\nCSV file by email.&nbsp; The Master Branch is\nleft untouched while the new Branch is updated and tested.&nbsp; Once that is tested and working, the Branch is\nmerged back into the Master.&nbsp; <\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><a href=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Branch-Overview.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Branch-Overview.png\" alt=\"\" class=\"wp-image-1507\" width=\"297\" height=\"199\" srcset=\"https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Branch-Overview.png 396w, https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Branch-Overview-300x201.png 300w\" sizes=\"(max-width: 297px) 100vw, 297px\" \/><\/a><figcaption class=\"wp-element-caption\"> Branch Overview <\/figcaption><\/figure>\n\n\n\n<p>A Branch start and\nend with commits to the Master Branch.&nbsp;\nThis is an important distinction between Branch and Fork.&nbsp; Branches are intended to merge back into Master,\nwhile Forks become their own thing.<\/p>\n\n\n\n<p>To create a Branch\nin Visual Studio Code, start by opening the repository to Branch and open the\nCommand Palette by pressing Crtl + Shift + P (Cmd + Shift + P on Mac) and type Git: Create\nBranch.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Git-Create-Branch.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"321\" src=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Git-Create-Branch-1024x321.png\" alt=\"\" class=\"wp-image-1508\" srcset=\"https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Git-Create-Branch-1024x321.png 1024w, https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Git-Create-Branch-300x94.png 300w, https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Git-Create-Branch-768x240.png 768w, https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Git-Create-Branch.png 1150w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\"> Git Create Branch <\/figcaption><\/figure>\n\n\n\n<p>Next,\nenter the name of the Branch.&nbsp; The name\n\u201cFeature-1\u201d is used in this example.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Git-Create-Branch-Name.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" loading=\"lazy\" width=\"860\" height=\"210\" src=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Git-Create-Branch-Name.png\" alt=\"\" class=\"wp-image-1509\" srcset=\"https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Git-Create-Branch-Name.png 860w, https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Git-Create-Branch-Name-300x73.png 300w, https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Git-Create-Branch-Name-768x188.png 768w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/a><figcaption class=\"wp-element-caption\"> Git Create Branch Name <\/figcaption><\/figure>\n\n\n\n<p>After\nthat type <em>Master<\/em> for the Branch<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Branch-from-Master.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" loading=\"lazy\" width=\"786\" height=\"248\" src=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Branch-from-Master.png\" alt=\"\" class=\"wp-image-1510\" srcset=\"https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Branch-from-Master.png 786w, https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Branch-from-Master-300x95.png 300w, https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Branch-from-Master-768x242.png 768w\" sizes=\"(max-width: 786px) 100vw, 786px\" \/><\/a><figcaption class=\"wp-element-caption\"> Branch from Master <\/figcaption><\/figure>\n\n\n\n<p>The Branch\nwas created and VSCode is working with the new <em>Feature-1 <\/em>Branch.&nbsp; This is indicated in the bottom left-hand\ncorner.&nbsp; The icon Changed from <em>Master<\/em>\nto <em>Feature-1<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Current-Branch.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" loading=\"lazy\" width=\"128\" height=\"47\" src=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Current-Branch.png\" alt=\"\" class=\"wp-image-1511\"\/><\/a><figcaption class=\"wp-element-caption\"> Current Branch <\/figcaption><\/figure>\n\n\n\n<p>Now that the new Branch has been created, make a change to the script, save and commit the change as outlined in my previous article <a href=\"https:\/\/www.ciraltos.com\/git-and-vs-code-for-the-lone-scripter\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"here (opens in a new tab)\">here<\/a>.&nbsp; Run the command <em>git show-branch &#8211;a<\/em> in the VS Code terminal to display the Branches in the repository.&nbsp; Notice there are two shown.&nbsp; <\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/git-show-branch.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" loading=\"lazy\" width=\"457\" height=\"232\" src=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/git-show-branch.png\" alt=\"\" class=\"wp-image-1512\" srcset=\"https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/git-show-branch.png 457w, https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/git-show-branch-300x152.png 300w\" sizes=\"(max-width: 457px) 100vw, 457px\" \/><\/a><figcaption class=\"wp-element-caption\"> git show-branch <\/figcaption><\/figure>\n\n\n\n<p>At this\npoint in our hypothetical scenario, the code has been Branched, changes made and\neverything tests good.&nbsp; It\u2019s time to\nmerge the Feature-1 Branch back to the Master Branch for all the world to\nenjoy. <\/p>\n\n\n\n<p>Start by\nchanging back to the Master Branch. &nbsp;This\nis an important step. &nbsp;Merging happens in\nto a Branch.&nbsp; If this step is missed, the\nnext step will merge Master to the Feature-1 Branch.&nbsp; To switch to the Master Branch, type <em>git:\ncheckout<\/em> in the VS Code Command Palette.&nbsp;\nThe next window shows the list of available Branches.&nbsp; Select Master and continue.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Checkout-Master.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" loading=\"lazy\" width=\"872\" height=\"300\" src=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Checkout-Master.png\" alt=\"\" class=\"wp-image-1513\" srcset=\"https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Checkout-Master.png 872w, https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Checkout-Master-300x103.png 300w, https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Checkout-Master-768x264.png 768w\" sizes=\"(max-width: 872px) 100vw, 872px\" \/><\/a><figcaption class=\"wp-element-caption\"> Checkout Master <\/figcaption><\/figure>\n\n\n\n<p>The editor\nis now in the Master Branch.&nbsp; Master\nshould display at the bottom left of the VS Code window. <\/p>\n\n\n\n<p>Start\nthe merge process by typing <em>git: merge Branch <\/em>in the VS Code Command Palette.\n&nbsp;Next, select the Branch to merge,\nFeature-1 for this example.&nbsp; That\nfinishes the merge process.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Git-Merge.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" loading=\"lazy\" width=\"774\" height=\"260\" src=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Git-Merge.png\" alt=\"\" class=\"wp-image-1514\" srcset=\"https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Git-Merge.png 774w, https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Git-Merge-300x101.png 300w, https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/Git-Merge-768x258.png 768w\" sizes=\"(max-width: 774px) 100vw, 774px\" \/><\/a><figcaption class=\"wp-element-caption\"> Git Merge <\/figcaption><\/figure>\n\n\n\n<p>The\nFeature-1 Branch has been merged and is no longer needed.&nbsp; The next step is to remove it.&nbsp; To do so, start by going to the VS Code\nCommand Palette and type <em>git: branch delete<\/em>.&nbsp; Select the Branch to delete in the next\nscreen.&nbsp; The only Branch available is\nFeature-1 in this example.&nbsp; That deletes\nthe Branch.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Git-Branch-Delete.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/Git-Branch-Delete.png\" alt=\"\" class=\"wp-image-1515\"\/><\/a><figcaption class=\"wp-element-caption\"> Git Branch Delete <\/figcaption><\/figure>\n\n\n\n<p>Run the <em>git\nshow-branch &#8211;a <\/em>command to show the existing Branches.&nbsp; Notice the commit from Feature-1 shows as\npart of the Master Branch, but there is only one Branch.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/git-show-branch-master.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" loading=\"lazy\" width=\"466\" height=\"198\" src=\"https:\/\/www.ciraltos.com\/wp-content\/uploads\/2019\/11\/git-show-branch-master.png\" alt=\"\" class=\"wp-image-1516\" srcset=\"https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/git-show-branch-master.png 466w, https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2019\/11\/git-show-branch-master-300x127.png 300w\" sizes=\"(max-width: 466px) 100vw, 466px\" \/><\/a><\/figure>\n\n\n\n<p>Although\nwe did not push changes to a remote repository, all changes could be pushed to and\nwould be reflected in a remote repo.<\/p>\n\n\n\n<h2>Conclusion<\/h2>\n\n\n\n<p>Forking\nis good for \u201cborrowing\u201d someone else\u2019s code.&nbsp;\nForking makes it easy to copy and modify other scripts to fit your needs.&nbsp; It\u2019s worth understanding how it works.<\/p>\n\n\n\n<p>A best\npractice for developers is to create and modify code Branches and merge them back\nto Master when complete.&nbsp; This makes\nsense for a multi-developer environment where code review and tracking take\nplace.&nbsp; <\/p>\n\n\n\n<p>I almost\nnever create Branches. Being the only one using my scripts, it\u2019s just easier to\nedit in the Master Branch.&nbsp; However,\ncreating a separate Branch provides the ability to make and test changes\nwithout impacting the production Master Branch.&nbsp;\nBranching may be a good habit for even lone scripters to get into for larger\nor critical scripts.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my first post, I made the bold statement that I would leave Branch and Fork out of this series because as a Sysadmin and loan scripter, I simply don\u2019t need that functionality.&nbsp; However, I didn\u2019t feel that this would be a complete series on Git if I didn\u2019t spend some time on Git Branch &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/\"> <span class=\"screen-reader-text\">Git for the Lone Scripter &#8211; Fork, Branch &#038; Merge<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":3972,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":""},"categories":[8],"tags":[600,601,598,341,338,599],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Git for the Lone Scripter - Fork, Branch &amp; Merge - ciraltos<\/title>\n<meta name=\"description\" content=\"I didn\u2019t feel that this would be a complete series on Git if I didn\u2019t spend some time on Git Branch and Fork. At a minimum, it is helpful to understand what it is and how it works.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Git for the Lone Scripter - Fork, Branch &amp; Merge - ciraltos\" \/>\n<meta property=\"og:description\" content=\"I didn\u2019t feel that this would be a complete series on Git if I didn\u2019t spend some time on Git Branch and Fork. At a minimum, it is helpful to understand what it is and how it works.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/\" \/>\n<meta property=\"og:site_name\" content=\"ciraltos\" \/>\n<meta property=\"article:published_time\" content=\"2019-11-15T02:00:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-24T03:43:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2023\/03\/git.png\" \/>\n\t<meta property=\"og:image:width\" content=\"220\" \/>\n\t<meta property=\"og:image:height\" content=\"92\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Travis Roberts\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ciraltos\" \/>\n<meta name=\"twitter:site\" content=\"@ciraltos\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Travis Roberts\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/\"},\"author\":{\"name\":\"Travis Roberts\",\"@id\":\"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/25391996d6cddfecd4d257162b7e373a\"},\"headline\":\"Git for the Lone Scripter &#8211; Fork, Branch &#038; Merge\",\"datePublished\":\"2019-11-15T02:00:39+00:00\",\"dateModified\":\"2023-03-24T03:43:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/\"},\"wordCount\":1093,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/25391996d6cddfecd4d257162b7e373a\"},\"keywords\":[\"code\",\"code management\",\"fork\",\"git\",\"github\",\"merge\"],\"articleSection\":[\"Trends\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/\",\"url\":\"https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/\",\"name\":\"Git for the Lone Scripter - Fork, Branch & Merge - ciraltos\",\"isPartOf\":{\"@id\":\"http:\/\/www.ciraltos.com\/staging2\/#website\"},\"datePublished\":\"2019-11-15T02:00:39+00:00\",\"dateModified\":\"2023-03-24T03:43:57+00:00\",\"description\":\"I didn\u2019t feel that this would be a complete series on Git if I didn\u2019t spend some time on Git Branch and Fork. At a minimum, it is helpful to understand what it is and how it works.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/www.ciraltos.com\/staging2\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Git for the Lone Scripter &#8211; Fork, Branch &#038; Merge\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.ciraltos.com\/staging2\/#website\",\"url\":\"http:\/\/www.ciraltos.com\/staging2\/\",\"name\":\"ciraltos\",\"description\":\"cloud, technology and trends\",\"publisher\":{\"@id\":\"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/25391996d6cddfecd4d257162b7e373a\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.ciraltos.com\/staging2\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/25391996d6cddfecd4d257162b7e373a\",\"name\":\"Travis Roberts\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2023\/03\/Logo-1.png\",\"contentUrl\":\"https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2023\/03\/Logo-1.png\",\"width\":5657,\"height\":3563,\"caption\":\"Travis Roberts\"},\"logo\":{\"@id\":\"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/www.ciraltos.com\",\"https:\/\/twitter.com\/ciraltos\"],\"url\":\"https:\/\/www.ciraltos.com\/staging2\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Git for the Lone Scripter - Fork, Branch & Merge - ciraltos","description":"I didn\u2019t feel that this would be a complete series on Git if I didn\u2019t spend some time on Git Branch and Fork. At a minimum, it is helpful to understand what it is and how it works.","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:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/","og_locale":"en_US","og_type":"article","og_title":"Git for the Lone Scripter - Fork, Branch & Merge - ciraltos","og_description":"I didn\u2019t feel that this would be a complete series on Git if I didn\u2019t spend some time on Git Branch and Fork. At a minimum, it is helpful to understand what it is and how it works.","og_url":"https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/","og_site_name":"ciraltos","article_published_time":"2019-11-15T02:00:39+00:00","article_modified_time":"2023-03-24T03:43:57+00:00","og_image":[{"width":220,"height":92,"url":"https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2023\/03\/git.png","type":"image\/png"}],"author":"Travis Roberts","twitter_card":"summary_large_image","twitter_creator":"@ciraltos","twitter_site":"@ciraltos","twitter_misc":{"Written by":"Travis Roberts","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/#article","isPartOf":{"@id":"https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/"},"author":{"name":"Travis Roberts","@id":"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/25391996d6cddfecd4d257162b7e373a"},"headline":"Git for the Lone Scripter &#8211; Fork, Branch &#038; Merge","datePublished":"2019-11-15T02:00:39+00:00","dateModified":"2023-03-24T03:43:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/"},"wordCount":1093,"commentCount":0,"publisher":{"@id":"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/25391996d6cddfecd4d257162b7e373a"},"keywords":["code","code management","fork","git","github","merge"],"articleSection":["Trends"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/","url":"https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/","name":"Git for the Lone Scripter - Fork, Branch & Merge - ciraltos","isPartOf":{"@id":"http:\/\/www.ciraltos.com\/staging2\/#website"},"datePublished":"2019-11-15T02:00:39+00:00","dateModified":"2023-03-24T03:43:57+00:00","description":"I didn\u2019t feel that this would be a complete series on Git if I didn\u2019t spend some time on Git Branch and Fork. At a minimum, it is helpful to understand what it is and how it works.","breadcrumb":{"@id":"https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.ciraltos.com\/staging2\/git-for-the-lone-scripter-fork-branch-merge\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/www.ciraltos.com\/staging2\/"},{"@type":"ListItem","position":2,"name":"Git for the Lone Scripter &#8211; Fork, Branch &#038; Merge"}]},{"@type":"WebSite","@id":"http:\/\/www.ciraltos.com\/staging2\/#website","url":"http:\/\/www.ciraltos.com\/staging2\/","name":"ciraltos","description":"cloud, technology and trends","publisher":{"@id":"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/25391996d6cddfecd4d257162b7e373a"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.ciraltos.com\/staging2\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/25391996d6cddfecd4d257162b7e373a","name":"Travis Roberts","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/image\/","url":"https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2023\/03\/Logo-1.png","contentUrl":"https:\/\/www.ciraltos.com\/staging2\/wp-content\/uploads\/2023\/03\/Logo-1.png","width":5657,"height":3563,"caption":"Travis Roberts"},"logo":{"@id":"http:\/\/www.ciraltos.com\/staging2\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/www.ciraltos.com","https:\/\/twitter.com\/ciraltos"],"url":"https:\/\/www.ciraltos.com\/staging2\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.ciraltos.com\/staging2\/wp-json\/wp\/v2\/posts\/1500"}],"collection":[{"href":"https:\/\/www.ciraltos.com\/staging2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ciraltos.com\/staging2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ciraltos.com\/staging2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ciraltos.com\/staging2\/wp-json\/wp\/v2\/comments?post=1500"}],"version-history":[{"count":7,"href":"https:\/\/www.ciraltos.com\/staging2\/wp-json\/wp\/v2\/posts\/1500\/revisions"}],"predecessor-version":[{"id":3982,"href":"https:\/\/www.ciraltos.com\/staging2\/wp-json\/wp\/v2\/posts\/1500\/revisions\/3982"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ciraltos.com\/staging2\/wp-json\/wp\/v2\/media\/3972"}],"wp:attachment":[{"href":"https:\/\/www.ciraltos.com\/staging2\/wp-json\/wp\/v2\/media?parent=1500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ciraltos.com\/staging2\/wp-json\/wp\/v2\/categories?post=1500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ciraltos.com\/staging2\/wp-json\/wp\/v2\/tags?post=1500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}