{"id":81,"date":"2018-07-16T22:38:12","date_gmt":"2018-07-16T22:38:12","guid":{"rendered":"http:\/\/www.projectimmerse.com\/?p=81"},"modified":"2020-06-16T23:18:07","modified_gmt":"2020-06-16T23:18:07","slug":"github-submitting-a-pull-request","status":"publish","type":"post","link":"https:\/\/www.projectimmerse.com\/blog\/github-submitting-a-pull-request\/","title":{"rendered":"Github &#8211; Submitting a Pull Request"},"content":{"rendered":"<h2>Overview<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.projectimmerse.com\/wp-content\/uploads\/2018\/07\/github-pull-request-1024x490.png\" alt=\"Submitting a Github Pull Request\" width=\"660\" height=\"316\" class=\"aligncenter size-large wp-image-84\" srcset=\"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2018\/07\/github-pull-request-1024x490.png 1024w, https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2018\/07\/github-pull-request-300x144.png 300w, https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2018\/07\/github-pull-request-768x368.png 768w, https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2018\/07\/github-pull-request-80x38.png 80w, https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2018\/07\/github-pull-request.png 2018w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/p>\n<p>A step by step guide on the pull request cycle. Submitting a pull request is part of a larger process in which external members can make modifications to the existing code base. <\/p>\n<h2>Forking<\/h2>\n<h3>Fork target repository<\/h3>\n<p>Cloning involves making a copy of a git repository onto a local machine. In contrast, a fork is a cloning of one git repository to another repository.<\/p>\n<p><!--more--><\/p>\n<p>Make necessary modifications to the codebase. After this is complete, the next step is to submit a pull request. While submitting a pull request, a message is required indicating any helpful notes describing the task. <\/p>\n<p>Send a pull request, which is simply a request for changes. First check the Comments and Files Changed tab to verify final changes. <\/p>\n<p>Cloning your Fork to local machine<br \/>\nRun the following command to clone the forked repo to your local machine.<\/p>\n<p># Clone your fork to your local machine<br \/>\ngit clone git@github.com:USERNAME\/FORKED-PROJECT.git<\/p>\n<p>Keeping your fork up to date<br \/>\nKeep your fork up to date by tracking the original \u201cupstream\u201d, to do this you\u2019ll need to add a remote. <\/p>\n<p># Add &#8216;upstream&#8217; repo to list of remotes<br \/>\ngit remote add upstream https:\/\/github.com\/UPSTREAM-USER\/ORIGINAL-PROJECT.git<\/p>\n<p># Verify the new remote named &#8216;upstream&#8217;<br \/>\ngit remote -v<\/p>\n<p>Whenever you want to update your fork with the latest upstream changes, you&#8217;ll need to first fetch the upstream repo&#8217;s branches and latest commits to bring them into your repository:<\/p>\n<p># Fetch from upstream remote<br \/>\ngit fetch upstream<\/p>\n<p># View all branches, including those from upstream<br \/>\ngit branch -va<\/p>\n<p>Now, checkout your own master branch and merge the upstream repo&#8217;s master branch:<\/p>\n<p># Checkout your master branch and merge upstream<br \/>\ngit checkout master<br \/>\ngit merge upstream\/master<\/p>\n<p>If there are no unique commits on the local master branch, git will simply perform a fast-forward. However, if you have been making changes on master (in the vast majority of cases you probably shouldn&#8217;t be, you may have to deal with conflicts. When doing so, be careful to respect the changes made upstream.<br \/>\nNow, your local master branch is up-to-date with everything modified upstream.<br \/>\nDoing your work<\/p>\n<h2>Create a branch<\/h2>\n<p>Whenever you begin work on a new feature or bugfix, it&#8217;s important that you create a new branch. Not only is it proper git workflow, but it also keeps your changes organized and separated from the master branch so that you can easily submit and manage multiple pull requests for every task you complete.<br \/>\nTo create a new branch and start working on it:<\/p>\n<p># Checkout the master branch &#8211; you want your new branch to come from master<br \/>\ngit checkout master<\/p>\n<p># Create a new branch named newfeature (give your branch its own simple informative name)<br \/>\ngit branch newfeature<\/p>\n<p># Switch to your new branch<br \/>\ngit checkout newfeature<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview A step by step guide on the pull request cycle. Submitting a pull request is part of a larger process in which external members can make modifications to the existing code base. Forking Fork target repository Cloning involves making a copy of a git repository onto a local machine. In contrast, a fork is &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.projectimmerse.com\/blog\/github-submitting-a-pull-request\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Github &#8211; Submitting a Pull Request&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":1116,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-81","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Github - Submitting a Pull Request - Project Immerse<\/title>\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.projectimmerse.com\/blog\/github-submitting-a-pull-request\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Github - Submitting a Pull Request - Project Immerse\" \/>\n<meta property=\"og:description\" content=\"Overview A step by step guide on the pull request cycle. Submitting a pull request is part of a larger process in which external members can make modifications to the existing code base. Forking Fork target repository Cloning involves making a copy of a git repository onto a local machine. In contrast, a fork is &hellip; Continue reading &quot;Github &#8211; Submitting a Pull Request&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.projectimmerse.com\/blog\/github-submitting-a-pull-request\/\" \/>\n<meta property=\"og:site_name\" content=\"Project Immerse\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-16T22:38:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-06-16T23:18:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2018\/07\/github-submitting-a-pull-request-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"750\" \/>\n\t<meta property=\"og:image:height\" content=\"750\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"projectimmerse\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"projectimmerse\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/github-submitting-a-pull-request\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/github-submitting-a-pull-request\\\/\"},\"author\":{\"name\":\"projectimmerse\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/#\\\/schema\\\/person\\\/c53f2864be524ee6fa08a7e4800dd1e5\"},\"headline\":\"Github &#8211; Submitting a Pull Request\",\"datePublished\":\"2018-07-16T22:38:12+00:00\",\"dateModified\":\"2020-06-16T23:18:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/github-submitting-a-pull-request\\\/\"},\"wordCount\":471,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/github-submitting-a-pull-request\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/github-submitting-a-pull-request-1.png\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/github-submitting-a-pull-request\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/github-submitting-a-pull-request\\\/\",\"url\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/github-submitting-a-pull-request\\\/\",\"name\":\"Github - Submitting a Pull Request - Project Immerse\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/github-submitting-a-pull-request\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/github-submitting-a-pull-request\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/github-submitting-a-pull-request-1.png\",\"datePublished\":\"2018-07-16T22:38:12+00:00\",\"dateModified\":\"2020-06-16T23:18:07+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/#\\\/schema\\\/person\\\/c53f2864be524ee6fa08a7e4800dd1e5\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/github-submitting-a-pull-request\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/github-submitting-a-pull-request\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/github-submitting-a-pull-request\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/github-submitting-a-pull-request-1.png\",\"contentUrl\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/github-submitting-a-pull-request-1.png\",\"width\":750,\"height\":750,\"caption\":\"GitHub - Submitting a Pull Request\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/github-submitting-a-pull-request\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Github &#8211; Submitting a Pull Request\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/\",\"name\":\"Project Immerse\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/#\\\/schema\\\/person\\\/c53f2864be524ee6fa08a7e4800dd1e5\",\"name\":\"projectimmerse\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d06955033d6227bfdcf30014e457e4334f7deeb73907de49b65ec2484921931?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d06955033d6227bfdcf30014e457e4334f7deeb73907de49b65ec2484921931?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d06955033d6227bfdcf30014e457e4334f7deeb73907de49b65ec2484921931?s=96&d=mm&r=g\",\"caption\":\"projectimmerse\"},\"url\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/author\\\/projectimmerse\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Github - Submitting a Pull Request - Project Immerse","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.projectimmerse.com\/blog\/github-submitting-a-pull-request\/","og_locale":"en_US","og_type":"article","og_title":"Github - Submitting a Pull Request - Project Immerse","og_description":"Overview A step by step guide on the pull request cycle. Submitting a pull request is part of a larger process in which external members can make modifications to the existing code base. Forking Fork target repository Cloning involves making a copy of a git repository onto a local machine. In contrast, a fork is &hellip; Continue reading \"Github &#8211; Submitting a Pull Request\"","og_url":"https:\/\/www.projectimmerse.com\/blog\/github-submitting-a-pull-request\/","og_site_name":"Project Immerse","article_published_time":"2018-07-16T22:38:12+00:00","article_modified_time":"2020-06-16T23:18:07+00:00","og_image":[{"width":750,"height":750,"url":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2018\/07\/github-submitting-a-pull-request-1.png","type":"image\/png"}],"author":"projectimmerse","twitter_card":"summary_large_image","twitter_misc":{"Written by":"projectimmerse","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.projectimmerse.com\/blog\/github-submitting-a-pull-request\/#article","isPartOf":{"@id":"https:\/\/www.projectimmerse.com\/blog\/github-submitting-a-pull-request\/"},"author":{"name":"projectimmerse","@id":"https:\/\/www.projectimmerse.com\/blog\/#\/schema\/person\/c53f2864be524ee6fa08a7e4800dd1e5"},"headline":"Github &#8211; Submitting a Pull Request","datePublished":"2018-07-16T22:38:12+00:00","dateModified":"2020-06-16T23:18:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.projectimmerse.com\/blog\/github-submitting-a-pull-request\/"},"wordCount":471,"commentCount":0,"image":{"@id":"https:\/\/www.projectimmerse.com\/blog\/github-submitting-a-pull-request\/#primaryimage"},"thumbnailUrl":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2018\/07\/github-submitting-a-pull-request-1.png","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.projectimmerse.com\/blog\/github-submitting-a-pull-request\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.projectimmerse.com\/blog\/github-submitting-a-pull-request\/","url":"https:\/\/www.projectimmerse.com\/blog\/github-submitting-a-pull-request\/","name":"Github - Submitting a Pull Request - Project Immerse","isPartOf":{"@id":"https:\/\/www.projectimmerse.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.projectimmerse.com\/blog\/github-submitting-a-pull-request\/#primaryimage"},"image":{"@id":"https:\/\/www.projectimmerse.com\/blog\/github-submitting-a-pull-request\/#primaryimage"},"thumbnailUrl":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2018\/07\/github-submitting-a-pull-request-1.png","datePublished":"2018-07-16T22:38:12+00:00","dateModified":"2020-06-16T23:18:07+00:00","author":{"@id":"https:\/\/www.projectimmerse.com\/blog\/#\/schema\/person\/c53f2864be524ee6fa08a7e4800dd1e5"},"breadcrumb":{"@id":"https:\/\/www.projectimmerse.com\/blog\/github-submitting-a-pull-request\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.projectimmerse.com\/blog\/github-submitting-a-pull-request\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.projectimmerse.com\/blog\/github-submitting-a-pull-request\/#primaryimage","url":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2018\/07\/github-submitting-a-pull-request-1.png","contentUrl":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2018\/07\/github-submitting-a-pull-request-1.png","width":750,"height":750,"caption":"GitHub - Submitting a Pull Request"},{"@type":"BreadcrumbList","@id":"https:\/\/www.projectimmerse.com\/blog\/github-submitting-a-pull-request\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.projectimmerse.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Github &#8211; Submitting a Pull Request"}]},{"@type":"WebSite","@id":"https:\/\/www.projectimmerse.com\/blog\/#website","url":"https:\/\/www.projectimmerse.com\/blog\/","name":"Project Immerse","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.projectimmerse.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.projectimmerse.com\/blog\/#\/schema\/person\/c53f2864be524ee6fa08a7e4800dd1e5","name":"projectimmerse","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4d06955033d6227bfdcf30014e457e4334f7deeb73907de49b65ec2484921931?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4d06955033d6227bfdcf30014e457e4334f7deeb73907de49b65ec2484921931?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4d06955033d6227bfdcf30014e457e4334f7deeb73907de49b65ec2484921931?s=96&d=mm&r=g","caption":"projectimmerse"},"url":"https:\/\/www.projectimmerse.com\/blog\/author\/projectimmerse\/"}]}},"_links":{"self":[{"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/posts\/81","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/comments?post=81"}],"version-history":[{"count":4,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/posts\/81\/revisions"}],"predecessor-version":[{"id":471,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/posts\/81\/revisions\/471"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/media\/1116"}],"wp:attachment":[{"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/media?parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/categories?post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/tags?post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}