If you only want to use git, you have to modify post-update.sample under hooks in the .git directory in your git warehouse on the server. Add a line of git pull and name it post-update and give it execution permissions (chmod +x post-update).
There is a hook file in git, which can realize automatic deployment. You can search Baidu and Google for the specific usage. It can automatically deploy the program you uploaded from git to the folder you specify
Git also transfers your files to the server through ssh, why not use ssh directly?
Improve efficiency a little more, incremental update:
If you only want to use git, you have to modify post-update.sample under hooks in the .git directory in your git warehouse on the server.
Add a line of git pull and name it post-update and give it execution permissions (chmod +x post-update).
There is a hook file in git, which can realize automatic deployment. You can search Baidu and Google for the specific usage. It can automatically deploy the program you uploaded from git to the folder you specify