Git Push-To-Deploy is the easiest way to integrate with Git. To configure it, all you need are:
The file-flow is linear, one-way, as follows:
Navigate to the GIT tab on the site you’re working with.
Fill in at least the following fields (if they are not yet setup in your Global settings area)
Click on the SAVE CREDENTIALS button. This will setup credentials for the site but will NOT create a local git repository on the server.
If credentials are saved successfully, the screen will refresh and two new sections will appear at the bottom of credentials area:
You need to set a branch name here – usually ‘master’ or ‘main’. And the option for “What Should We Do” needs to be set to FETCH (COPY CHANGES TO SITE).
Any changes that are pushed to the branch(es) listed here will automatically trigger an update to the files on your site.
After filling out the two options, click the SAVE ACTIONS button.
Generate your Push-To-Deploy keys by clicking the RESET KEYS button.
These two items need to go into your GITHUB Webhooks settings screen. Usually this is under the repository SETTINGS area.
In there, add a new Webhook (the Add Webhook button is usually on the upper left.)
Don’t forget to click the green ADD WEBHOOK button to save your settings.
Change a file in your git repository. You should see the changes flow through to your site after a few minutes.