I'm trying to figure out a way to deploy a dist folder to a different remote repo using Git. 
The working project is stored in an app folder. I use grunt to optimize and compile the working project into a dist folder. I want to know if there is a way I can than use git to push only the dist folder to a different remote than the origin that the rest of the project uses. 
Obviously, I just need the dist folder to go live. Not the whole project.
I tried looking into Git Subtree - but I'm not sure that I'm understanding the concept or if I can use it to accomplish what I'm trying to do.
Any advice would be extremely helpful!
Thanks in advance!
Rich
You can:
dist as a submodule: see Git Submodules.set a remote within the dist repo referencing your production server.   
git remote add prod /url/to/your/prod/server
push from that submodule
cd dist
git push prod master
That supposes you have, on your server:
dist.git
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With