Reading through the pre-git docs I notice that the Grunt build tasks in the configuration section are run with the Pre-push hook, but I'm having trouble wrapping my head around how that would work.
Whats the workflow here? I can't deploy the built files to the same src location because I don't want to overwrite my dev files. Nor do I want to push my dev files to the remote server. I only want to commit my dev files.
If I move the built files into a seperate deploy folder, I would still be pushing my dev fles to remote server.
The only way I can think of doing this is having a seperate git repo that I use just for pushing the built source files to remote. So, I would use the Pre-commit hook to add the built source files to seperate git repo and then manually cd into that repo and run git push origin from there.
This seems clunky and error prone to me though. It would be very easy to mistakenly push my working directory dev files to the remote instead of the built source files. It also requres an extra step over adding all the built files on pre-push.
Reading through the pre-git docs I notice that the Grunt build tasks in the configuration section are run with the Pre-push hook, but I'm having trouble wrapping my head around how that would work.
Whats the workflow here? I can't deploy the built files to the same
src
location because I don't want to overwrite my dev files. Nor do I want to push my dev files to the remote server. I only want to commit my dev files.If I move the built files into a seperate deploy folder, I would still be pushing my dev fles to remote server.
The only way I can think of doing this is having a seperate git repo that I use just for pushing the built source files to remote. So, I would use the Pre-commit hook to add the built source files to seperate git repo and then manually cd into that repo and run
git push origin
from there.This seems clunky and error prone to me though. It would be very easy to mistakenly push my working directory dev files to the remote instead of the built source files. It also requres an extra step over adding all the built files on pre-push.
Thanks :)