When using “Sync > Push to Kinsta” the local .git folder is also uploaded to the staging site. That folder is huge in some projects and should not be uploaded for several reasons
I just had some issues on my staging site, because of another unexpected sync behavior:
After pushing changes from local to stage, I had many local-URLs in the website source. After quick debugging, I found that the entire cache files (generated by a plugin) were uploaded by the sync process - those files obviously contain wrong URLs.
Also, on my local site, I have two debugging plugins that I do not want to push to the hosting environment.
My suggestions:
-
Either give us an option to define folders that should not be synced -OR- do not sync any folder that ends in “cache” or starts with “.git” -OR- check if a .gitignore file exists at the local website root and only sync files that are not ignored
-
After syncing, do a “wp_cache_flush()” call on the updated website.
A very good suggestion, I hope it will be included in the roadmap.