Hosting Guides

How to Use Git Version Control on Your Mamdali Hosting

Git version control hosting - Mamdali Technology guide

Git version control hosting lets you keep your website’s code in a repository and deploy changes to your hosting package in a controlled way. You can connect a remote repository from GitHub, or keep a local repository inside your own file space. This guide shows you how to switch it on and use it.

How to enable Git version control hosting

  1. Log in to your hosting control panel and open Manage Hosting.
  2. Select Options, then Manage, on the hosting package you want to edit.
  3. Under the Web Files area, select Git Version Control.
  4. Enter your details manually, or sign in to GitHub using single sign-on. Set the name and email you want to appear when you deploy using Git, then select Enable.

You will then see your list of repositories, along with the options to set up your first one.

Cloning a Git repository

To clone a repository, first create a remote repository on GitHub, following GitHub’s own guide to creating a repository. Then:

  1. Open the repository on GitHub, select Code and copy the URL provided (the one without the SSH protocol).
  2. Paste it into the Clone URL field.
  3. Set the file path where you want the repository to be set up.
  4. Enter a Repository Name. This is only a display name for the list.
  5. Select Create. Your repository now appears in the list.

Private repositories: you will need to set up a public/private key pair and use the SSH URL provided by GitHub instead.

Use the Options button next to a repository to manage it, view its history, open its files in File Manager, copy its URL, or remove it from the list.

Managing a repository

When you manage a repository you will find three tabs:

  • Basic Information – check and update the details of the repository.
  • Development – pull or deploy changes. Select Deploy HEAD Commit to deploy the changes you have made to your repository directly.
  • History – see which changes have been deployed over time.

Creating a local repository

If you do not want to deploy from a remote repository, you can keep a local one inside your package’s file space. Select Create New Repository, then open the Local Repository tab and fill in the fields:

  • Folder and name – where the repository lives and what it is called.
  • Deployment Type – choose whether changes deploy automatically, or only when you manually select the Deploy button.
  • Deployment Branch – the Git branch your changes deploy to. You can work on several branches, so you can try out tweaks without affecting your main codebase.

Tip: if you are new to Git, start with manual deployment so nothing goes live until you choose to deploy it.

Need help with Git version control hosting?

Need a hand setting up Git deployment for your site? Contact our support team, or have a look at our Web Hosting and Node.js Hosting plans.