studio icon indicating copy to clipboard operation
studio copied to clipboard

Feature Request: Honor internal .gitignore files before pushing to the demo

Open bacoords opened this issue 1 year ago • 4 comments
trafficstars

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.

bacoords avatar May 15 '24 21:05 bacoords

Great suggestion, @bacoords — thanks!

danielbachhuber avatar May 15 '24 23:05 danielbachhuber

+1

faisalahammad avatar May 26 '24 15:05 faisalahammad

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?

wojtekn avatar Jul 26 '24 10:07 wojtekn

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.

bacoords avatar Aug 14 '24 22:08 bacoords