I have recently joined a new team of developers and we are incorporating Git and Git Flow branching models into our work environments.
So far we have the develop and master branches set up in our remote repo. The develop branch has an automatic hook that deploys code to our staging area when a push is seen. I have also just created a tag containing production ready code.
My question now is what is the best, or industry standard, way to move to production from this state?
Some options I see are:
- Clone the repo from the tag version at the production location. Then in the future do pulls from newly created tags.
- Perform a command similar to this
git archive <tag> | tar -x -C /path/to/live/sitemanually every time we want to go to production with a new tag.
I personally prefer strategy mentioned here. You may want to read in details ?