{"id":9171,"date":"2022-09-05T10:32:25","date_gmt":"2022-09-05T09:32:25","guid":{"rendered":"https:\/\/www.20i.com\/blog\/?p=9171"},"modified":"2025-12-19T12:11:21","modified_gmt":"2025-12-19T12:11:21","slug":"git-version-control-my20i","status":"publish","type":"post","link":"https:\/\/www.20i.com\/blog\/git-version-control-my20i\/","title":{"rendered":"Git version control comes to My20i"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">For those not in the know, we have an introductory <a href=\"https:\/\/www.20i.com\/blog\/beginners-guide-git-all-you-need-to-know\/\">Beginners Guide to Git<\/a> here. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But to summarise: Git<sup>TM<\/sup> allows you work on multiple versions of your website (or any codebase), and track the changes that have been made. If you&#8217;re happy with the changes, they can then be &#8216;pushed&#8217; to the live version. You can restore previous versions too.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Git is a great way to work collaboratively, allowing multiple people to work on a single project simultaneously without getting in each others&#8217; way. You can track revisions and boost team productivity without the &#8216;live&#8217; code being modified.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Git and My20i<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">While it&#8217;s always been possible to use Git on projects on 20i hosting, it involved accessing the files <a href=\"https:\/\/www.20i.com\/support\/reseller-hosting\/connect-via-ssh\">by SSH<\/a> and then using the command line to manage the project. It wasn&#8217;t the most user-friendly way to do it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, with the Git and <a href=\"https:\/\/www.20i.com\/my20i\" target=\"_blank\" rel=\"noreferrer noopener\">My20i<\/a> integration, we have a graphical user interface inside our hosting control panel. It will speed things up for you and web development team.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can&nbsp;clone, manage and deploy Git repositories directly. If you want to manage multiple repositories in one package, you can keep track of version changes and deploy your sites as and when you\u2019d like. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And the best bit: you can do all this at a click of a button.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"gitstarted\">Get started in My20i<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">What follows is a brief intro to how to manage Git Version Control in My20i. This information is also available in the 20i Knowledge Base: <a href=\"https:\/\/www.20i.com\/support\/reseller-hosting\/git-version-control-my20i\" target=\"_blank\" rel=\"noreferrer noopener\">How do I use Git version control in My20i?<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We&#8217;ll be covering:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#gitstarted\">How to access Git in My20i<\/a><\/li>\n\n\n\n<li><a href=\"#cloning\">How to clone a remote repository using Github<\/a><\/li>\n\n\n\n<li><a href=\"#manage\">Managing a repository<\/a><\/li>\n\n\n\n<li><a href=\"#createrepo\">Creating a local repository<\/a><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image alignright size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/08\/git-version-control.svg\" alt=\"Git version control icon\" class=\"wp-image-9198\" width=\"150\" height=\"150\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To get<em> <\/em>started, you&#8217;ll first need to:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Sign in to <a href=\"https:\/\/my.20i.com\/\">My20i<\/a><\/li>\n\n\n\n<li>Head to <a href=\"https:\/\/my.20i.com\/services\/hosting\" target=\"_blank\" rel=\"noreferrer noopener\">Manage Hosting<\/a>, and select <strong>Options &gt; Manage<\/strong> on the package you want use Git with<\/li>\n\n\n\n<li>Under <strong>Web Files<\/strong>, you&#8217;ll see a <strong>Git<sup>TM<\/sup> Version Control<\/strong> icon &#8211; select it<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">You\u2019ll be asked for a name and email \u2013 set these to be the details you\u2019d like to show when deploying using Git. Then click <strong>Enable<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"cloning\">Cloning a remote Git repository in My20i<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The first thing you&#8217;ll see is your repository (repo) list &#8211; empty if this is new to you &#8211; and the option to set up your first repo.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/08\/gitversioncontrol.png\" alt=\"Git version control: manage or create repositories in My20i\" class=\"wp-image-9179\" width=\"600\" height=\"320\" srcset=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/08\/gitversioncontrol.png 1008w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/08\/gitversioncontrol-300x161.png.webp 300w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/08\/gitversioncontrol-768x411.png.webp 768w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/08\/gitversioncontrol-370x198.png.webp 370w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/08\/gitversioncontrol-270x145.png.webp 270w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/08\/gitversioncontrol-570x305.png.webp 570w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/08\/gitversioncontrol-740x396.png.webp 740w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/08\/gitversioncontrol-150x80.png.webp 150w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Cloning a repository using our tool means that you&#8217;ll first need to have a remote repository in <a href=\"https:\/\/github.com\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">GitHub<\/a>.  The best way to do this is to follow the steps highlighted in their <a href=\"https:\/\/docs.github.com\/en\/repositories\/creating-and-managing-repositories\/creating-a-new-repository\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">documentation<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once done, head to the Github repository, select <strong>Code<\/strong>, then copy the URL provided.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/08\/giturl.png\" alt=\"Getting the repo's URL in Github\" class=\"wp-image-9180\" width=\"600\" height=\"260\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">(Note that for private repositories, you&#8217;ll need to set up a public\/private key pair and use the SSH URL provided instead.)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Paste the URL into the <strong>Clone URL<\/strong> area in My20i, then set the file path of where you want your repository to set up. Lastly, set up a <strong>Repository Name<\/strong>&nbsp;&#8211; a display name for the My20i UI.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then, hit <strong>Create<\/strong>. Your repo and its path will show in the Repository List now.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"manage\">Managing a repository<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You&#8217;ll notice that there&#8217;s a &#8216;kebab&#8217; &#8211; three vertical dots &#8211; to the right of your repo name and path. From here, you can <strong>Manage<\/strong> the repo, see its <strong>History<\/strong>, go to the <strong>File Manager<\/strong>, <strong>Copy the URL<\/strong> or <strong>Remove<\/strong> it from the list.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We&#8217;ll concern ourselves with <strong>Managing <\/strong>a repo here. You can pull or deploy changes, view its history or edit information:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"514\" height=\"449\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/08\/managerepo.png\" alt=\"Managing a Git repo in My20i\" class=\"wp-image-9181\" srcset=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/08\/managerepo.png 514w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/08\/managerepo-300x262.png.webp 300w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/08\/managerepo-370x323.png.webp 370w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/08\/managerepo-270x236.png.webp 270w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/08\/managerepo-150x131.png.webp 150w\" sizes=\"auto, (max-width: 514px) 100vw, 514px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To pull or deploy, go to the second tab. You can select <strong>Deploy HEAD Commit <\/strong>to deploy the changes you&#8217;ve made.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/08\/pullordeploy.png\" alt=\"Pull or Deploy menu for Git\" class=\"wp-image-9182\" width=\"600\" height=\"270\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You can use the<strong> History<\/strong>&nbsp;tab to see what changes have been deployed in the history of the Git setup.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"createrepo\">Creating a local Git repository in My20i<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Don&#8217;t want to deploy to a remote repository, and simply use a local one in your package\u2019s file space? You can set this up via the UI too. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Select <strong>Create New Repository<\/strong> and then hit the <strong>Local Repository<\/strong> tab.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"582\" height=\"648\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/08\/create-local-repository.png\" alt=\"Creating a version control Git repository \" class=\"wp-image-9183\" srcset=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2022\/08\/create-local-repository.png 582w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/08\/create-local-repository-269x300.png.webp 269w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/08\/create-local-repository-400x445.png.webp 400w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2022\/08\/create-local-repository-150x167.png.webp 150w\" sizes=\"auto, (max-width: 582px) 100vw, 582px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You can then fill out the informational fields.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Deployment Type<\/strong>&nbsp;is a choice between whether you want changes to deployed automatically, or if you want to only deploy your changes when manually selecting the <strong>Deploy<\/strong> button.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>Deployment Branch<\/strong> is used if you have multiple branches being worked-on simultaneously that don&#8217;t affect your repo&#8217;s main codebase. You can find a great tutorial on <a href=\"https:\/\/www.atlassian.com\/git\/tutorials\/using-branches\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Git Branches here<\/a>. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Version Control: Git down<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">So there&#8217;s a very basic guide to how the new My20i Git version control user interface works. We hope you can make good use of it, speeding up your collaborative workflow and tracking changes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On use, you might find ways it can be improved and optimised &#8211; so, as always, let us know how you get on.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you have any suggestions, please use our <a href=\"https:\/\/my.20i.com\/feedback\" target=\"_blank\" rel=\"noreferrer noopener\">customer feedback<\/a> form in My20i. <\/p>\n\n\n\n<script type=\"application\/ld+json\">\n{\n  \"@context\": \"http:\/\/schema.org\",\n  \"@type\": \"Webpage\",\n  \"name\": \"My20i\",\n  \"url\": \"https:\/\/www.20i.com\/my20i\",\n  \"@id\": \"https:\/\/www.20i.com\/my20i#webpage\",\n  \"sameAs\": [\n    \"https:\/\/www.facebook.com\/hostedby20i\",\n    \"https:\/\/www.instagram.com\/hostedby20i\/\",\n    \"https:\/\/twitter.com\/hostedby20i\",\n    \"https:\/\/www.linkedin.com\/company\/20i\",\n    \"https:\/\/www.youtube.com\/c\/20ihosting\"\n  ]\n}\n<\/script>\n<script type=\"application\/ld+json\">\n{\n  \"@context\": \"http:\/\/schema.org\",\n  \"@type\": \"WebPage\",\n  \"@id\": \"https:\/\/www.20i.com\/blog\/git-version-control-my20i\/#webpage\",\n  \"url\": \"https:\/\/www.20i.com\/blog\/git-version-control-my20i\/\",\n  \"inLanguage\": \"en-gb\",\n  \"name\": \"Git version control comes to My20i\",\n  \"description\": \"A handy Git user interface has been embedded in the My20i web hosting control panel. It' s perfect for web developers.\",\n  \"isPartOf\": {\n    \"@id\": \"https:\/\/www.20i.com\/my20i#webpage\"\n  },\n  \"about\": [\n    {\n      \"@type\": \"Thing\",\n      \"name\": \"My20i\",\n      \"sameAs\": \"https:\/\/www.20i.com\/my20i\"\n    },\n    {\n      \"@type\": \"Thing\",\n      \"name\": \"Git\",\n      \"sameAs\": \"https:\/\/en.wikipedia.org\/wiki\/Git\"\n    }\n  ],\n  \"mentions\": [\n    {\n      \"@type\": \"Thing\",\n      \"name\": \"Web hosting\",\n      \"sameAs\": \"https:\/\/en.wikipedia.org\/wiki\/Web_hosting_service\"\n    }\n  ]\n}\n<\/script>\n","protected":false},"excerpt":{"rendered":"We&#8217;re delighted to introduce a new feature to My20i: Git version control.","protected":false},"author":2,"featured_media":9172,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"csco_singular_sidebar":"","csco_page_header_type":"","csco_page_load_nextpost":"","footnotes":""},"categories":[46],"tags":[57,79],"class_list":["post-9171","post","type-post","status-publish","format-standard","has-post-thumbnail","category-20i","tag-web-design","tag-web-development","cs-entry"],"_links":{"self":[{"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/posts\/9171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/comments?post=9171"}],"version-history":[{"count":23,"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/posts\/9171\/revisions"}],"predecessor-version":[{"id":10532,"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/posts\/9171\/revisions\/10532"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/media\/9172"}],"wp:attachment":[{"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/media?parent=9171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/categories?post=9171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/tags?post=9171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}