{"id":1537,"date":"2019-02-08T10:35:56","date_gmt":"2019-02-08T10:35:56","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2019\/02\/08\/1583302-how-to-deploy-a-git-repository-in-hostinger\/"},"modified":"2026-03-16T12:12:17","modified_gmt":"2026-03-16T12:12:17","slug":"1583302-how-to-deploy-a-git-repository-in-hostinger","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/1583302-how-to-deploy-a-git-repository-in-hostinger\/","title":{"rendered":"How to Deploy a Git Repository in Hostinger"},"content":{"rendered":"<p class=\"no-margin\">Git is a Version Control System that can be used to track changes in any file and is commonly used to develop software. While it is mainly designed to coordinate work among programmers, it can also be used to track changes in any set of files.<\/p><p class=\"no-margin\">\n<\/p><div class=\"intercom-h2b-video\">\n<iframe loading=\"lazy\" title=\"How to Use GitHub for Beginners\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/BovIkSKStPw?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><h2 id=\"deployment\">Deployment<\/h2><p class=\"no-margin\">If you wish to deploy a Git repository, find your target site in the <b><a href=\"https:\/\/hpanel.hostinger.com\/websites\" target=\"_blank\" class=\"intercom-content-link\" rel=\"noopener\">Websites<\/a> <\/b>section and click on<b> Manage <\/b>next to it. <\/p><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">Then, search for <b>Git <\/b>on<b> <\/b>the left sidebar and click on the result:<br>&#8203; <\/p><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2019\/02\/ef3dae90-8efa-4d9d-b987-c32b73723750.jpg\" alt=\"The Git section in hPanel at Hostinger\"><\/div><p class=\"no-margin\">In the <b>Create a New Repository<\/b> field, you can set up your deployment settings:<\/p><ul>\n<li>\n<p class=\"no-margin\">Make sure you select the correct <b>Repository Address<\/b> and<b> Branch<\/b>, or the deployment will fail<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Leave the <b>Install Path<\/b> empty, and your website will be deployed to your account&rsquo;s root folder (\/public_html)<\/p>\n<\/li>\n<\/ul><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2019\/02\/b3d660fb-de52-41f1-9503-8abe368f1125.jpg\" alt=\"The \"><\/div><div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">\n<p class=\"no-margin\">The install path directory <b>must not contain any files or folders<\/b>; otherwise, deployment will fail &#128161; <\/p>\n<\/div><p class=\"no-margin\">Once you add a New Repository to the account, you will be presented with four buttons:<\/p><p class=\"no-margin\">\n<\/p><div class=\"intercom-container\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2019\/02\/f7d5a1e9-822a-45a4-9cbe-20f25ebdb553.jpg\"><\/div><ol>\n<li>\n<p class=\"no-margin\"><b>Deploys <\/b>your already created repository<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Allows you to continuously and <b>automatically deploy your projects<\/b> each time you push new commits to your repository<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Shows the <b>latest build output<\/b><\/p>\n<\/li>\n<li>\n<p class=\"no-margin\"><b>Deletes<\/b> the selected repository<\/p>\n<\/li>\n<\/ol><p class=\"no-margin\">\n<\/p><h2 id=\"how-to-use-a-webhook-url\">How to Use a Webhook URL<\/h2><p class=\"no-margin\">You can use the <b>Webhook URL<\/b> for <b>Auto Deployment<\/b> to merge a selected Git branch. You will be given a Webhook URL once you press the <b>Auto-Deployment<\/b> button:<\/p><p class=\"no-margin\">\n<\/p><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2019\/02\/04243930-0ae9-4da7-a08b-1cd14795ffe7.jpg\" alt=\"Auto Deployment Setup \"><\/div><p class=\"no-margin\">Webhooks allow you to build or set up integrations that subscribe to certain events on GitHub. When one of those events is triggered, the scenario will start. Webhooks can be used to update an external issue tracker, update a backup mirror, or even deploy to your production server. You&rsquo;re only limited by your imagination &#128522;<\/p><div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">\n<p class=\"no-margin\">During the setup, you will be given external links on how to create a Webhook URL. This feature is very useful, for example, if a <code>composer.json<\/code> file exists, <code>composer update<\/code> will run automatically as well.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Deploying and managing git repositories using Hostinger\u2019s hPanel<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[264],"tags":[],"class_list":["post-1537","post","type-post","status-publish","format-standard","hentry","category-advanced-hpanel"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/1583302-how-to-deploy-a-git-repository-in-hostinger\/","default":1},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/support\/1583302-como-implementar-un-repositorio-git-en-hostinger\/","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/support\/1583302-comment-deployer-un-depot-git-hostinger\/","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/support\/1583302-bagaimana-cara-deploy-repositori-git-di-hostinger\/","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/br\/support\/1583302-como-implantar-fazer-o-deploy-de-um-repositorio-git-hostinger\/","default":0},{"locale":"uk-UA","link":"https:\/\/www.hostinger.com\/ua\/support\/1583302----git--hostinger\/","default":0}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1537","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=1537"}],"version-history":[{"count":2,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1537\/revisions"}],"predecessor-version":[{"id":6292,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/1537\/revisions\/6292"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=1537"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=1537"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=1537"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}