Document root when using Git


Well-Known Member
Feb 19, 2016
cPanel Access Level
Root Administrator

I'm quite new to Git, but I've been playing with it since cPanel 72.

I've created a Git repository in cPanel with the Git repository set to a folder outside of 'public_html'.

What is the suggested way to deploy this application? I've been thinking through the following scenarios:

  • Set the Git repository path at 'public_html'
  • Configure an addon domains document root to the Git repository folder
  • Set up a symlink from 'public_html' to the Git repository folder
What is the suggested/recommended way to handle this?

Is it possible to automatically move a copy of the files in the Git repo to the websites document root, or is it better to just set the Git repo and website document root as the same folder?