How to merge staging branch with live
Let's say I'm happy with my staging deployment and I want to propagate it to live, I'm guessing that the next step is to merge the staging branch with live's. The build server checks out the live branch, builds and deploys. Except, what if the merge has some unexpected results?
How do I make sure that the final merge results in a successful deployment before writing over the live files?
You don't have to worry about errors resulting from merging, if you only merge your staging-branch into your live-branch and never commit any changes to the live-branch. See:
staging A---B---C---E---F---G---H---J---K---L---M \ \ \ live D---------------I---------------N
This way there is no possibility for a merge conflict, because only the stating-branch changes over time.