Say I have a Git repo folder where I do all my development. The master branch represents the production code and any development is merged in from different branches, as required. That's all fine. What if, now, I wanted to push the master branch somewhere within my local filesystem (e.g., a sibling folder), whenever I want to roll the master branch out to production?
Is this possible, with Git? For instance, say I have my project in ~/development/myProject-dev, can I push just the master branch into ~/development/myProject as a live mirror; that is, ~/development/myProject is publicly accessible, whereas its -dev brother has restricted access?
If this is fine, it seems like a good solution because ~/development/myProject will also be a repo and can always be rolled back to a stable state, if say the changes made in development introduced a bug. Would you agree that this is a viable workflow? Are there better approaches (e.g., Git hooks, etc.)?