We currently have our development websites setup as a git repository. currently we publish the websites by using pulling into another directory and maintain this as the "production" versions of all of our sites. The downside to this is that it means I cannot break our customers out into separate cPanel accounts. To solve this I have created a cPanel account and then following the directions in this post
user@sv1 [/home/ncpn/public_html]# git init
Initialized empty Git repository in /home/ncpn/public_html/.git/
user@sv1 [/home/ncpn/public_html]# git remote add -f origin /home/tendesig/public_html/respond/app/sites
Updating origin
remote: Counting objects: 15586, done.
remote: Compressing objects: 100% (14816/14816), done.
remote: Total 15586 (delta 6694), reused 0 (delta 0)
Receiving objects: 100% (15586/15586), 949.18 MiB | 36.26 MiB/s, done.
Resolving deltas: 100% (6694/6694), done.
From /home/tendesig/public_html/respond/app/sites
* [new branch] master -> origin/master
user@sv1 [/home/ncpn/public_html]# git config core.sparseCheckout true
user@sv1 [/home/ncpn/public_html]# echo "ncpn/" >> .git/info/sparse-checkout
user@sv1 [/home/ncpn/public_html]# git pull origin master
I have a few issues and dont even know if this is the best approach.
because this fetches the entire repository and if we did this using our current inventory, it would mean almost a gig of disk space used for each customer.
this is probably just a matter of syntax, but using the above commands, it puts the new data in /public_html/ncpn
and I need it to be in just /public_html
Is using sparse checkout even the best approach for what I want to accomplish? If so how do I echo the checkout so that it copies the files into the current directory instead of say /public_html/ncpn
?