What is the path I should install my Git repository to Git Version Control

Operating System & Version
CentOS 7.9
cPanel & WHM Version
0.00 0.02 0.05

RGFuelCells

Member
Oct 18, 2021
13
2
3
College Station
cPanel Access Level
Root Administrator
So I'm looking at the video documentation from cPanel: cPanel Tutorials - Git Version Control

And I noticed the developer put installed her repository in a path like this:
/home/user/repositories/SSPbycPanel
I installed mine in a directory like this:
/home/user/public_html/
From my experience using other web development technologies git is supposed to be installed directly in the root of the project, so here it is installed outside of the project? If so why does cPanel say it should be like that? Do I now have to delete my current repository and create a new one in a directory like this:
/home/user/repositories/website-name
 

HostNoc

Well-Known Member
Feb 20, 2020
157
38
28
Ontario
cPanel Access Level
Root Administrator
You can make any of your local directory as a GIT project (i.e repository). For example, if your project is located under /home/ramesh/projects/passworddragon, you can make that as your GIT project.

cd /home/ramesh/projects/passworddragon


$ git init
Initialized empty Git repository in /home/ramesh/projects/passworddragon/.git/

Regards
HostNoc
 
  • Like
Reactions: cPanelAnthony

RGFuelCells

Member
Oct 18, 2021
13
2
3
College Station
cPanel Access Level
Root Administrator
I guess my real question is that I don't know how I'm supposed to use this feature, even coming from a background with Git, cPanel, LAMP and FTP are the things that are new to me. So my question is I have my repository from Git Version Control setup like this:
/home/user/my-repo/

So how is my repo supposed to relate to the public_html/ path in my server? Am I supposed to use FTP to upload my entire project to public_html once I have a new commit on the master branch? Or is there a better workflow?
 

cPanelAnthony

Administrator
Staff member
Oct 18, 2021
1,041
112
118
Houston, TX
cPanel Access Level
Root Administrator
Hello! Could you see if the following guide clears things up? Having everything written out may help. If not, can you let me know what could be improved in this article?