For information about how to configure a Git client to work with hosting.com servers, please see this article.
About Git
The popular Git version control system is installed on all hosting.com shared and reseller accounts. For VPS and Dedicated Server accounts, you can install Git manually yourself, or we can install it for you upon request. Like other version control systems, Git enables you to track multiple revisions of files and directories. The following sections are a brief introduction to Git’s basic features.Git has numerous features and commands, many of which are beyond the scope of this article. For detailed information about all of Git’s commands, please see the
official Git documentation.
official Git documentation.
Creating a repository
To create a Git repository, all you have to do is log in to your hosting.com account using SSH, and then type the following command:You may receive the following message when you try to commit changes:If you receive this message, type the following commands, using your own e-mail address and name:
Making changes to a repository
Git makes it easy to update a repository. After you edit a file or files, you update Git’s file “snapshot” by using the git add command. To make the changes to the repository permanent, use the git commit command. To view changes you have made to files in the repository since the last commit, type the following command:Working with branches
A single Git repository can maintain multiple development branches. For example, you could create a “testing” branch and a “production” branch to track changes for different versions. To create a new branch, type the following command, replacing name with the name of the new branch:Merging changes from another branch
To merge changes from one branch into another branch, type the following command. Replace name with the name of branch that has the changes you want to merge:Cloning a repository
You can “clone” repositories. When you clone a repository, git makes an exact copy of an existing repository. For example, say you have a repository named project. To clone the repository into a directory named projectclone, you would type the following command, replacing username with your own account username:If you try to clone a Git repository stored on a remote server (such as GitHub) by using HTTPS, you may receive the following error message:This error occurs when your account has the jailshell enabled. Please open a ticket on the Hosting Panel at https://my.hosting.com and request normal shell access for your account.