Whenever we update the files for a site, certain files will be excluded. Which files are excluded depends on the method used to update the site files.
There are SIX ways to update the files for a site using git:
For push-to-deploy with the COPY CHANGES TO SITE option, all files in the repository are copied to the site. Then, we do a two way sync of the plugins, themes and mu-plugins folders so that the files in the repository and the files in those folders are mirror images.
For all other folders, files that are in the site but not in the repository remain in the site.
For push-to-deploy with the CHECKOUT option, all files in the repo are synced with the site. In this case, file exclusions are handled using the contents of .gitignore.
When we initialize a site with a Git Repo and sync it to your central (remote) repository, we automatically update the .gitignore file with some of our own, non-negotiable file exclusions:
All files in the repo are synced using git with the site.
File exclusions are handled using the contents of .gitignore.
All files in the repo are synced using git with the site.
File exclusions are handled using the contents of .gitignore.
All files in the repository are copied to the site. Then, we do a two way sync of the plugins, themes and mu-plugins folders so that the files in the repository and the files in those folders are mirror images.
For all other folders, files that are in the site but not in the repository remain in the site.
See Also