We recently upgraded all our web hosting servers to cPanel 72 which has brought many improvements and new features. One of the more exciting and much requested features is Git support. Git is a free and open source distributed version control system that is used by commercial and open source projects. In the open source space you’ll find many of the most popular projects on Github and Gitlab. While a more advanced feature and concept it is now something you’ll be able to leverage in your cPanel.When you login to cPanel you’ll now find under the files option a new “Git™ Version Control” option that’ll bring you to the GIT management page
Upon clicking the button you’ll be brought to the GIT repository page of cPanel
You can use the create option from here and you’ll be brought to a page to create an actual repository. In my case I’m opting to clone the popular Flarum PHP forum project but you could also use this to clone your own repository.
After you’ve created the repository you can now manage it from the list repository interface
You can now view the history of the repository which would include a list of commits, tags and branches. You’ll also be able to modify your repository by changing the currently active checked out branch.
This feature is somewhat limited currently but with the upcoming cPanel 74 release there will be the introduction of several new features which will help improve the workflow of the Git™ Version Control.
- Ability to manually or automatically deploy changes from cPanel-hosted repositories
- Custom .cpanel.yml file which will allow you to add deployment tasks to specific repositories
- The system pulls changes with the
--ff-onlyoption and will only succeed if the branch’s HEAD commit is up-to-date or Git can fast forward it.
We hope everyone who’s been asking for this feature enjoys the fact it’s now available in your cPanel. Once cPanel 74 is available we suspect more power users will utilize it to deploy updates to their websites code.