welaika / wordmove

Multi-stage command line deploy/mirroring and task runner for Wordpress
https://wptools.it/wordmove
MIT License
1.87k stars 165 forks source link

Disabling push #447

Closed TylerBarnes closed 6 years ago

TylerBarnes commented 6 years ago

Is it possible to disable pushing with the movefile? My team uses git for theme files and we only edit the database on our staging server. Disabling push would be an awesome feature since pushing theme files messes up our git repo and pushing the database will potentially overwrite other changes someone else has made.

justinmaurerdotdev commented 6 years ago

I second this request. We have one environment that hosts our "master" database. It would be nice if we could block the --push command from accepting the --db and/or --plugins flags.

alessandro-fazzi commented 6 years ago

I follow your thoughts. But when you @tyler-barnes say

pushing theme files messes up our git repo

Why? We use git on every type of project - and I hope everyone's doing the same :P - but I've never noticed problems.

You question and need are both clear. I'm just willing to better understand the whole scenario. ☺️

TylerBarnes commented 6 years ago

@pioneerskies when someone pushes the theme with wordmove the server stops automatically pulling changes from our dev branch because someone has to go to the server and commit all the changed files first. If a couple other people then also commit to the same branch there can be conflicts that have to be resolved on the server before it starts auto pulling again. It's not a big deal but it's a minor annoyance when it happens. We also have have a lot of files and folders that don't need to be on the server, for instance node modules, so that ends up taking up extra space where it's not needed. I could be missing something that would make this a non issue. It's only happened a few times and then we all agreed to stop pushing theme files with wordmove but it would be nice to be able to block it altogether.

alessandro-fazzi commented 6 years ago

Oh ok...so your workflow is to push to dev branch, than server will auto-pull in from the repo git. Am I right? So you anyway do not need to push themes with Wordmove.

About the unneeded files and folders, would this be of your interest in some other scenarios, you should use wordmove exclude section.

TylerBarnes commented 6 years ago

Oh awesome, I haven't used the exclude section before, thanks for mentioning it! Yes that's my workflow exactly. It isn't really a big deal since we can just make sure to never push our themes or db's but it seems like it would be a good feature to prevent it from happening. For instance if we were to work with a freelancer or when there is a new person on the team they might do it by accident.

alessandro-fazzi commented 6 years ago

Just referencing #205

colin-marshall commented 6 years ago

@tyler-barnes as a workaround you could make everybody use a bash alias when pushing and in the alias exclude the theme flag (or whatever you dont want them using) from the command.

alessandro-fazzi commented 6 years ago

weeeeee https://github.com/welaika/wordmove/releases/tag/v3.0.2 !!! 🎉

TylerBarnes commented 6 years ago

Awesome!! I can't imagine not using wordmove at this point. Thanks for creating such an incredible tool!