Enable the XSERVER website with the git push command. It's also a good training to learn Git and SSH public key authentication. Thank you to all the people on the site for your reference.
Create the production repository created on Public_html with XSERVER as the Remote Repository, and the bare-repository created in the directory for each server as the clone. A system in which the hooks of bare are detected by pushing from Local to bare-repository, post-receive is activated, the production repository pulls, and the data of bare is brought to the production repo. Recognized that a bare-repository is prepared and managed to avoid the risk of working with git in public_html.
--Create SSH key (prepared locally) Since the key will be reused on github and XSERVER later, it is convenient to push at the same time. --Create SSH config --Ssh connect to XSERVER and install git --Git init to Public_html, create production nonbare-repository, git init --Create bare-repository in the same hierarchy as public_html with git clone --Create post-receive in bare-repository hooks --Go to your local working folder and add bare-repository as remote-repo. --Push test from local and check the update contents in public_html
--Register SSH public key on github, link repo in github with git remote set-url --add. (Simultaneous push) --Set the remote destination of git pull to github 1. git remote rm origin 2. git remote add origin [email protected]: ~~~~~~ / ~~~~~~ (SSH connection path) 3. git remote set-url --add origin xsrv:~/~~~/~~~
-Let's create an environment that can be automatically deployed to the production environment with git push! -GitHub starting today -Procedure to install git on XSERVER -Procedure to install Git on X server -Procedure to create private / public key