简体   繁体   中英

Git bare repository on remote server

I have a web server with ssh access where I show my customers the preview of their WordPress website. On that Server, I create a git repository for each customer (example: xyz-website.com.git). I run "git init --bare" so I have a repository. Then, I create a hook (post-receive) where I set the git-dir and working-dir. So when I create a Website locally, I can push to that repository and the Website becomes available so the customer can check it.

Problem: When the customer decides to install plugins, there will be new files on the server. My Idea was whenever I need to code something for that website, I just "git pull". Which doesnt work.

Can anyone tell my why and how to solve my problem?

Check whether the wp-content/plugins/ folder is included in your .gitignore file. If it is there, remove it.

For more information, refer this URL: https://www.digitalocean.com/community/tutorials/how-to-set-up-automatic-deployment-with-git-with-a-vps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM