{"componentChunkName":"component---src-templates-blog-post-template-js","path":"/2017/01/05/git-and-github/","result":{"data":{"mdx":{"id":"e6e1c0c4-6063-5832-a0e3-1b256750c67d","frontmatter":{"title":"Git and GitHub","date":"2017 January 5th","cover":null},"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"date\": \"2017-01-05T00:00:00.000Z\",\n  \"title\": \"Git and GitHub\",\n  \"tags\": [\"information\", \"guide\"],\n  \"published\": true\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"I know why Linus called it that now!\"), mdx(\"p\", null, \"If you\\u2019re reading this there\\u2019s a good chance you know at least the\\nbasics of Git but if like me and you are the only person making\\nchanges to your repos then there\\u2019s a good chance that you just use\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"git push origin master\"), \" to move your changes from your local machine\\nto GitHub, this is not best practice.\"), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"640px\"\n    }\n  }), \"\\n      \", mdx(\"a\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/536686b63ad7e966fc425ed4c67c2ddc/ac4a7/git-logo.jpg\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": [\"noopener\"]\n  }), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"100%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/svg+xml,%3csvg%20xmlns=\\\\'http://www.w3.org/2000/svg\\\\'%20width=\\\\'400\\\\'%20height=\\\\'400\\\\'%3e%3cpath%20d=\\\\'M99%2037c-2%205-4%2014-4%2019v4h5c9%200%2018-5%2022-13%203-7%203-8-5-10-10-3-17-3-18%200m175%200l-6%202%202%204c3%2010%2012%2017%2022%2017h5v-6l-3-12-2-7h-6l-12%202m40%2091c-5%203-15%205-36%208h-4l3%204c7%208%2010%2016%2010%2026%200%2017-4%2029-12%2038l-19%2011-29%204c-17%201-52%201-63-1-38-6-54-21-54-51%200-11%202-17%208-25l4-5-8-1c-11-1-25-4-30-6s-5-2-6%200c-1%204%203%2037%205%2044%201%202-1%202-22%202-26%201-59%204-61%207a378%20378%200%200169-5h16l1%203%202%204h-9a345%20345%200%2000-66%2012c19-5%2043-8%2065-9l11-1%203%205%206%208%203%204-5%201c-6%201-7%201-7-1l-2-7-1-5-2%202c-7%206-5%2019%204%2024%204%202%206%209%204%2013-3%205%201%2023%206%2031l3%204-2%204c-2%203-2%206-2%209%202%2015%2025%2019%2031%205l2-5h10c12-1%2011-1%2011%203%200%206%200%206-3%206l-7%202-9%202-11%201-12%203c-4%200-6%201-8%203l-10%206-11%205-14%206-15%206-11%205c-10%203-14%209-8%2012l24%207c5%200%2014%203%2021%205l13%204c2%200%204%202%203%203l-8%202-7%202h6l12%201%2024%204c16%201%2018%202%2023%204%204%202%206%203%2015%204l10%201%209%201a549%20549%200%2000140-19c6%200%2016-4%2022-8%205-4%209-5%2017-6a54%2054%200%200023-8c2%200%202-3-2-7-3-3-4-4-9-4l-14-5-11-4-6-2c-2-2-9-4-15-6l-10-4c3-2-5-6-17-7-6-1-10-2-18-6-10-5-11-5-17-5l-10%202h-2v-15c0-22-3-31-11-40l-3-4%2010-2c29-4%2051-16%2062-33l4-7h10a410%20410%200%200178%2011%20345%20345%200%2000-88-13l1-4%201-3h16a395%20395%200%200172%205c2-1%201-1-2-2l-15-1a409%20409%200%2000-70-6c3-8%205-46%203-47l-2%201m-168%2024c-4%201-8%2010-8%2016%200%2016%2015%2024%2022%2011%207-14-2-32-14-27m97%202c-9%209-5%2029%205%2032%2014%202%2020-24%208-33-4-3-9-3-13%201m-134%2059c-3%203-1%2010%203%2014%202%202%203%207%201%2010l1%208c1%206%201%206%206%208%207%203%2017%203%2026%201l6-2%203-7c1-4%204-9%207-12l4-5h-6c-14-2-36-9-45-14l-4-3-2%202m88%2057c0%209%200%2016%201%2015%200-3%203-2%203%201%201%201%201-5%201-15%200-17-1-18-3-18h-2v17m-24-10c-2%204-2%207-2%2013%200%209%200%209%203%209l2%201v-27l-3%204m50%2010v15h5v-10c0-8%200-11-2-15l-3-4v14m-117%206c-1%203%200%204%202%207%205%205%2012%202%2012-5l-1-1-7-2-5-3-1%204\\\\'%20fill=\\\\'%23d3d3d3\\\\'%20fill-rule=\\\\'evenodd\\\\'/%3e%3c/svg%3e')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"picture\", {\n    parentName: \"a\"\n  }, \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/536686b63ad7e966fc425ed4c67c2ddc/60a22/git-logo.webp 160w\", \"/static/536686b63ad7e966fc425ed4c67c2ddc/4c812/git-logo.webp 320w\", \"/static/536686b63ad7e966fc425ed4c67c2ddc/0ba47/git-logo.webp 640w\", \"/static/536686b63ad7e966fc425ed4c67c2ddc/c1a89/git-logo.webp 896w\"],\n    \"sizes\": \"(max-width: 640px) 100vw, 640px\",\n    \"type\": \"image/webp\"\n  })), \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/536686b63ad7e966fc425ed4c67c2ddc/0913d/git-logo.jpg 160w\", \"/static/536686b63ad7e966fc425ed4c67c2ddc/cb69c/git-logo.jpg 320w\", \"/static/536686b63ad7e966fc425ed4c67c2ddc/c08c5/git-logo.jpg 640w\", \"/static/536686b63ad7e966fc425ed4c67c2ddc/ac4a7/git-logo.jpg 896w\"],\n    \"sizes\": \"(max-width: 640px) 100vw, 640px\",\n    \"type\": \"image/jpeg\"\n  })), \"\\n        \", mdx(\"img\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"src\": \"/static/536686b63ad7e966fc425ed4c67c2ddc/c08c5/git-logo.jpg\",\n    \"alt\": \"image of octocat\",\n    \"title\": \"image of octocat\",\n    \"loading\": \"lazy\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    }\n  })), \"\\n      \"), \"\\n  \"), \"\\n    \")), mdx(\"p\", null, \"What if it\\u2019s not your repository you want to make changes to? You\\u2019ll\\nneed to create a pull request, where you make a copy (fork) of the\\nrepo, make the changes to your copy (fork) then request that the owner\\nof the original repo pulls your changes into their repo. All super\\nstraight forward, right?\"), mdx(\"p\", null, \"As an example I\\u2019m going to document my change to the\\n\", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://github.com/spences10/awesome-twitter-bots\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"awesome-twitter-bots\"), \"\\nrepo that \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://twitter.com/amanhimself\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"@amanhimself\"), \" asked me to\\ncontribute to after I made a Twitter bot with his guides.\"), mdx(\"h2\", {\n    \"id\": \"step-1\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#step-1\",\n    \"aria-label\": \"step 1 permalink\",\n    \"className\": \"anchor-toc before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Step 1\"), mdx(\"p\", null, \"I will need to fork the repository on GitHub so I can make my changes.\"), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"640px\"\n    }\n  }), \"\\n      \", mdx(\"a\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/7898cedb809d19d597af446ca0683bd8/ebf47/fork-a-repo.png\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": [\"noopener\"]\n  }), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"13.662790697674417%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/svg+xml,%3csvg%20xmlns=\\\\'http://www.w3.org/2000/svg\\\\'%20width=\\\\'400\\\\'%20height=\\\\'55\\\\'%3e%3cpath%20d=\\\\'M172%2021c-1%202-2%203-4%203s-2%200%200%202l1%205c0%202%200%202%202%201h6c1%201%202%201%201-1l1-4c3-2%202-3%200-3l-4-3-2-2-1%202M26%2023c-2%202-3%203-2%205%204%207%2013%207%2017%200%202-3-4-8-8-8-3%200-5%201-7%203\\\\'%20fill=\\\\'%23d3d3d3\\\\'%20fill-rule=\\\\'evenodd\\\\'/%3e%3c/svg%3e')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"picture\", {\n    parentName: \"a\"\n  }, \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/7898cedb809d19d597af446ca0683bd8/60a22/fork-a-repo.webp 160w\", \"/static/7898cedb809d19d597af446ca0683bd8/4c812/fork-a-repo.webp 320w\", \"/static/7898cedb809d19d597af446ca0683bd8/0ba47/fork-a-repo.webp 640w\", \"/static/7898cedb809d19d597af446ca0683bd8/01c7f/fork-a-repo.webp 688w\"],\n    \"sizes\": \"(max-width: 640px) 100vw, 640px\",\n    \"type\": \"image/webp\"\n  })), \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/7898cedb809d19d597af446ca0683bd8/69538/fork-a-repo.png 160w\", \"/static/7898cedb809d19d597af446ca0683bd8/72799/fork-a-repo.png 320w\", \"/static/7898cedb809d19d597af446ca0683bd8/6af66/fork-a-repo.png 640w\", \"/static/7898cedb809d19d597af446ca0683bd8/ebf47/fork-a-repo.png 688w\"],\n    \"sizes\": \"(max-width: 640px) 100vw, 640px\",\n    \"type\": \"image/png\"\n  })), \"\\n        \", mdx(\"img\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"src\": \"/static/7898cedb809d19d597af446ca0683bd8/6af66/fork-a-repo.png\",\n    \"alt\": \"fork-a-repo\",\n    \"title\": \"fork-a-repo\",\n    \"loading\": \"lazy\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    }\n  })), \"\\n      \"), \"\\n  \"), \"\\n    \")), mdx(\"p\", null, \"Then clone my forked repository to where I\\u2019m all going to make the\\nchanges on my computer:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"$ git clone https://github.com/spences10/awesome-twitter-bots\\n\")), mdx(\"p\", null, \"Connect the fork to the Original Repository:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"$ git remote add upstream https://github.com/amandeepmittal/awesome-twitter-bots\\n\")), mdx(\"h2\", {\n    \"id\": \"step-2\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#step-2\",\n    \"aria-label\": \"step 2 permalink\",\n    \"className\": \"anchor-toc before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Step 2:\"), mdx(\"p\", null, \"Use \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"git status\"), \" to check what branch you are currently on.\"), mdx(\"p\", null, \"Make a (my) branch:\"), mdx(\"p\", null, \"I\\u2019m adding the\\n\", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://spences10.github.io/2017/01/04/twitter-mctwitbot.html\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"Twitter bot\"), \"\\nI made so I\\u2019m going to give my branch the same name as my repo\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"$ git branch spences10-twitter-bot\\n\")), mdx(\"p\", null, \"Now change to that branch with:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"$ git checkout spences10-twitter-bot\\n\")), mdx(\"p\", null, \"It should say you have switched to the branch but you can check with\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"git status\")), mdx(\"p\", null, \"Add your files \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, mdx(\"em\", {\n    parentName: \"strong\"\n  }, \"note\")), \" if you are adding a folder (like I am) just\\nusing \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"git add .\"), \" will add the folder as a file (which I learned from\\nbitter experience), what you will need to do is:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"$ git add spences10-twitter-bot/\\\\\\\\*\\n\")), mdx(\"p\", null, \"This will add the folder and all its contents, I would post my\\nterminal \\u2018output of shame\\u2019 here as it would take up the whole screen.\\nSo now I have added the folder I need to commit to my local repo with:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"$ git commit -m 'initial commit'\\n\")), mdx(\"p\", null, \"I get the terminal output confirming my files are added, then I\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"git push\"), \" to my branch I checked out earlier:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"$ git push origin spences10-twitter-bot\\n\")), mdx(\"p\", null, \"A quick check of the repo on GitHub confirms that the files are there\\nI\\u2019m now ready to add a contributor\\n\", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://github.com/amandeepmittal\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"@amandeepmittal\"), \" via the\\n\", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://github.com/spences10/awesome-twitter-bots/settings/collaboration\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"/settings/collaboration\"), \"\\nsection of my repo. I can then copy the invite link and send to Aman,\\nI\\u2019m sure he\\u2019ll be thrilled to see it!\"), mdx(\"h2\", {\n    \"id\": \"step-3\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#step-3\",\n    \"aria-label\": \"step 3 permalink\",\n    \"className\": \"anchor-toc before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Step 3\"), mdx(\"p\", null, \"Visit Aman\\u2019s repo and GitHub will have detected that I have pushed a\\nbranch to a fork, from here I can click on the \\u2018Compare & pull\\nrequest\\u2019 button.\"), mdx(\"p\", null, \"In the \\u2018Open a pull request\\u2019 page I\\u2019ll need to select the my fork and\\nthen my branch, so \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"spences10\\\\awesome-twitter-bots\"), \" and my branch\\nwhich is \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"spences10-twitter-bot\"), \" click the \\u2018Create pull request\\u2019\\nbutton.\"), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"640px\"\n    }\n  }), \"\\n      \", mdx(\"a\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/3344c43215debf994772b5f1893bc581/54bf4/open-a-pull-request.png\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": [\"noopener\"]\n  }), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"32.77060575968222%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/svg+xml,%3csvg%20xmlns=\\\\'http://www.w3.org/2000/svg\\\\'%20width=\\\\'400\\\\'%20height=\\\\'131\\\\'%3e%3cpath%20d=\\\\'M62%2039h-7l-6%201c0%203%2035%203%2036%201h1l16%201c9%200%2016%200%2015-1l-2-2h-1a110%20110%200%2001-29%200h-3l-2%201-14-1h-4m166%201h-1c-1-1-17-1-17%201l4%201a1042%201042%200%200156-2c1-1%201-1-9-1a199%20199%200%2001-30-1c-3%200-4%201-3%202m106%200h-1c-1-1-16-1-16%201l3%201a731%20731%200%200145-2l-3-1h-23l-2-1c-2%200-3%201-3%202M5%2074c-1%203%200%205%201%207%202%201%202%202%201%202l-2%203%201-1h2l3%202c3-1%207-4%205-4-1-1-1-1%201-2s3-4%201-9c0-2-1-2-7-2H5v4\\\\'%20fill=\\\\'%23d3d3d3\\\\'%20fill-rule=\\\\'evenodd\\\\'/%3e%3c/svg%3e')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"picture\", {\n    parentName: \"a\"\n  }, \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/3344c43215debf994772b5f1893bc581/60a22/open-a-pull-request.webp 160w\", \"/static/3344c43215debf994772b5f1893bc581/4c812/open-a-pull-request.webp 320w\", \"/static/3344c43215debf994772b5f1893bc581/0ba47/open-a-pull-request.webp 640w\", \"/static/3344c43215debf994772b5f1893bc581/e46b2/open-a-pull-request.webp 960w\", \"/static/3344c43215debf994772b5f1893bc581/aa5f8/open-a-pull-request.webp 1007w\"],\n    \"sizes\": \"(max-width: 640px) 100vw, 640px\",\n    \"type\": \"image/webp\"\n  })), \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/3344c43215debf994772b5f1893bc581/69538/open-a-pull-request.png 160w\", \"/static/3344c43215debf994772b5f1893bc581/72799/open-a-pull-request.png 320w\", \"/static/3344c43215debf994772b5f1893bc581/6af66/open-a-pull-request.png 640w\", \"/static/3344c43215debf994772b5f1893bc581/d9199/open-a-pull-request.png 960w\", \"/static/3344c43215debf994772b5f1893bc581/54bf4/open-a-pull-request.png 1007w\"],\n    \"sizes\": \"(max-width: 640px) 100vw, 640px\",\n    \"type\": \"image/png\"\n  })), \"\\n        \", mdx(\"img\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"src\": \"/static/3344c43215debf994772b5f1893bc581/6af66/open-a-pull-request.png\",\n    \"alt\": \"open-a-pull-request\",\n    \"title\": \"open-a-pull-request\",\n    \"loading\": \"lazy\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    }\n  })), \"\\n      \"), \"\\n  \"), \"\\n    \")), mdx(\"p\", null, \"The rest is up to the repository owner (Aman) now where he can chose\\nto merge my changes into his repo.\"), mdx(\"hr\", null), mdx(\"h3\", {\n    \"id\": \"thats-not-the-end-though\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#thats-not-the-end-though\",\n    \"aria-label\": \"thats not the end though permalink\",\n    \"className\": \"anchor-toc before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"That\\u2019s not the end though\"), mdx(\"p\", null, \"It turned out that Aman just wanted me to update the\\n\", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://github.com/amandeepmittal/awesome-twitter-bots/blob/master/README.md\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"README.md\"), \"\\non the repo so my pull request was cancelled :flushed:\"), mdx(\"p\", null, \"This was good though because I had the opportunity to go through the\\nwhole thing again, thus getting more familiar with the process, after\\nmaking my changes to my fork it was another pull request \", \"[PR]\", \" which\\nwas then successfully merged as PR\\n\", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://github.com/amandeepmittal/awesome-twitter-bots/pull/2\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"#2\")), mdx(\"h3\", {\n    \"id\": \"resources\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#resources\",\n    \"aria-label\": \"resources permalink\",\n    \"className\": \"anchor-toc before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"Resources\"), mdx(\"p\", null, \"A great resource for me was\\n\", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"http://jlord.us/git-it/index.html\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"Git-It\")), mdx(\"p\", null, \"And obviously the \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://help.github.com/\",\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"GitHub Help\"), \"\\ndocumentation.\"), mdx(\"h3\", {\n    \"id\": \"2fa\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#2fa\",\n    \"aria-label\": \"2fa permalink\",\n    \"className\": \"anchor-toc before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"2fa\"), mdx(\"p\", null, \"Another thing to note is if you\\u2019re using two factor authentication\\nyou\\u2019ll need to add your auth token in as a \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"remote set-url\"), \" so you can\\npush/pull without having to authenticate each time.\"), mdx(\"p\", null, mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"git remote set-url origin https://yourgithubuser:your-token@github.com/yourgithubuser/yourrepo.git\")));\n}\n;\nMDXContent.isMDXComponent = true;","excerpt":"I know why Linus called it that now! If you're reading this there's a good chance you know at least the\nbasics of Git but if like me and you…","tableOfContents":{"items":[{"url":"#step-1","title":"Step 1"},{"url":"#step-2","title":"Step 2:"},{"url":"#step-3","title":"Step 3","items":[{"url":"#thats-not-the-end-though","title":"That's not the end though"},{"url":"#resources","title":"Resources"},{"url":"#2fa","title":"2fa"}]}]},"timeToRead":2,"fields":{"slug":"/2017/01/05/git-and-github/","editLink":"https://github.com/spences10/thelocalhost.blog/edit/authoring/posts/2017/01/05/git-and-github/index.md"}}},"pageContext":{"slug":"/2017/01/05/git-and-github/","previous":{"id":"84bfef4c-ca4e-5e68-850f-952257b511aa","excerpt":"I must say this was great to do and a nice little introduction to node\nand npm. I got to doing this from finding it on  GitHub  I\nthink I was looking for the Twitter icon in bootstrap whilst working\non my\n Random Quote Generator  I\nstumbled across…","frontmatter":{"title":"Twitter McTwitBot","date":"2017-01-04T00:00:00.000Z"},"fields":{"slug":"/2017/01/04/twitter-mctwitbot/"}},"next":{"id":"0dfe4064-6535-5823-aefe-a1cbea7a361f","excerpt":"Want to get set up with your very own Twitter bot quickly and easily,\nwith this guide you can be set up in under 30 minutes. But first, why\nshould you want to build a Twitter bot? There are some really useful Twitter bots out there that do some…","frontmatter":{"title":"Easily set up your own Twitter bot","date":"2017-01-28T00:00:00.000Z"},"fields":{"slug":"/2017/01/28/twitter-bot-bootstrap/"}}}}}