If you are getting below error on your website about email verification than it is easy to fix it. ALERT ON WEBSITE: If you are the owner of this domain name, click here to verify What is this alert? When you register a new domain, ICANN send you a verification email. Do check your junk mail […]
Git Repositories in cPanel:
Git is a version control system for tracking, maintaining and updating the conflict free changes in the project, which are done by all the developers working on the project.
cPanel is an online Linux-based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site.
cPanel now officially provide the support to host Git Repos over the web servers. You can also manage the cPanel Git Repos either through the cPanel’s Git Version’s Control Option or also by using the commands after SSH to the server. Also, all the necessary required documentation for using Git in cPanel is available at official cPanel Documentation.
At this step, you have successfully created the Git repo in cPanel.
Note: You may also create Git repo at cPanel by SSH and to server and using commands as mentioned below:
Once you have logged into the Server via SSH using any tool like PuTTY.
Type this command in the directory that you want to use as Git Repo:
Now you have successfully created the Git Repo on Web Server, using commands, instead of GUI.
In the next step, as a Case 1, you will either clone your existing local computer’s Git Repo to Git Repo Created on Server / cPanel
As a case 2, you will clone the cPanel / Web Server’s Git Repo to your local PC’s newly created Git Repo.
The steps for both cases are described below:
Case 1: To PUSH Local Repo to cPanel Repo
Step 1: Navigate to your repository’s directory by this command:
Step 2: Configure your local repository to push to the cPanel-hosted repository:
git remote add origin ssh://[cPanelLoginUserName]@[WebsiteName]/[RepoPath]/[RepoName]
git push -u origin master
Case 2: To clone cPanel’s Git Repo to Local Git Repo:
Step 1: Clone the cPanel-hosted repository to your local computer and navigate to its directory:
git clone ssh://[cPanelLoginUserName]@[WebsiteName]/[RepoName]
Change your location to Git Repo Directory
Step 2: Create a README file:
echo “# README” >> README.md
Step 3: We enable the update, called as Staging the Update, in order to commit it then
git add README.md
Step 4: Commit the README file to the project:
git commit -m “Initial Commit”
Step 5: Push the Commit to Head Branch, hosted over cPanel Git
git push -u origin master