Tip: Start typing in the input box for immediate search results.

< Back
Print

Update or Deploy a Git Repository – cPanel

Learn how to Update or Deploy a Git™ Repository using cPanel. The Git™ Version Control feature allows you to host Git repositories on your cPanel account. You can use Git to maintain any set of files (for example, a website’s files and assets, a software development project, or simple text files). More information.

Make sure that your cPanel account includes shell access. Without shell access, you can only create, clone, delete and view repositories.
If you are using your local machine SSH, make sure that you have created an SSH public_key and have added it to your cPanel server.


Video tutorial – Update or Deploy a Git Repository


Step-by-step tutorial – Update or Deploy a Git Repository

  1. Log in to cPanel.

    Tutorial: login from the Client Area or the direct link.

    Find the Files section and click the GitTM Version Control.

    Extilum cPanel - Delete a Git Repository

  2. Git Version Control

    In the Repositories’ table list, choose the Repository and click the Manage button.

    Extilum cPanel - Update or Deploy a Git Repository using cPanel

  3. Basic Information tab

    Repository Path 
    — The repository’s directory. Click to open the directory for the repository in cPanel’s File Manager interface (cPanel >> Home >> Files >> File Manager) in a new browser tab.
    Repository Name 
    — The repository’s display name. To modify this name, enter the new name and click Update.
    Checked-Out Branch 
    — The currently checked-out local branch. To check out a different branch, select the desired branch and click Update.
    If you select a different branch, the system will automatically pull changes from the remote repository when it checks out that branch.
    If the repository is a bare repository, the system will not display this information.
    Currently Checked-Out Branch 
    — The currently checked-out local branch. Click to open the Gitweb interface in a new browser tab.
    HEAD Commit 
    — This section of the interface displays information about the active branch’s HEAD commit (the most recent commit to the branch). If the repository does not include any commits for the current branch or is a bare repository, the system will not display any 
    HEAD Commit information.
    Commit — The SHA-1 value for the HEAD commit.
    Author — The HEAD commit’s author.
    Date — The date of the HEAD commit.
    The commit message for the HEAD commit.
    History 
    — Click to open the Gitweb interface in a new browser tab. Gitweb allows you to browse the repository and view its history and contents.
    Remote URL 
    — The URL of the repository’s remote repository.
    Clone URL 
    — The URL to use to clone the repository to another location (for example, your local computer, another cPanel account, or a GitHub account). Click Copy to copy this URL to your clipboard.

    Click the Pull or Deploy tab.

    Extilum cPanel - Update or Deploy a Git Repository using cPanel

  4. Pull or Deploy tab

    Click the Update from Remote button to pull changes from the remote repository and apply them to the cPanel-managed copy of the repository. The system pulls changes with the --ff-only option and will only succeed if the branch’s HEAD commit is up-to-date or Git can fast-forward it.

    Click the Deploy HEAD Commit button to deploy changes from the cPanel-managed repository. Deployment requires a .cpanel.yml file and at least one local or remote branch.
    The system runs the tasks that you configure in the .cpanel.yml file in order to deploy the repository.
    We strongly recommend that you check the .cpanel.yml file in to your remote repository and not the cPanel-managed repository.
    The system cannot deploy changes for repositories with dirty working trees.


    Extilum cPanel - Update or Deploy a Git Repository using cPanel

  5. Wait for the success message.


    Extilum cPanel - Update or Deploy a Git Repository using cPanel

  6. Repository Path

    Click the Repository Path button to open the directory for the repository in cPanel’s File Manager interface (cPanel >> Home >> Files >> File Manager) in a new browser tab.

    Extilum cPanel - Update or Deploy a Git Repository using cPanel

  7. The repository’s directory


    Extilum cPanel - Update or Deploy a Git Repository using cPanel

Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.