studio
studio copied to clipboard
Feature Request: Honor internal .gitignore files before pushing to the demo
What
When I push to the demo site it wants to push everything but if I have a node_modules folder or some other folder that I've included in a .gitignore file, it would be great if studio recognized the file and ignored it.
Why
Developers may want to work on custom block plugins or something that has a build process and quickly share demos without having to manually delete all their node_modules. I'll also note that node_modules folders often exceed the 100MB limit and it's just good to conserve the bandwidth.
How
Ability to either add a .gitignore (or similar) file OR a recursive check through the wp-content folder for .gitignore files.
Great suggestion, @bacoords — thanks!
+1
It's an interesting suggestion.
However, in terms of implementation, should we rely on the GIT's .gitignore file or have another way to let Studio which files or directories should be ignored?
However, in terms of implementation, should we rely on the GIT's .gitignore file or have another way to let Studio which files or directories should be ignored?
This is a pretty common approach. Some tools include their own .*ignore file specific to their CI/CD workflow. For example, WPVIP lets you add a .deployignore file to specify things you want in the repo but not on the server.