I have two branches in Bitbucket: 'live' and 'staging'. The main project for the live website is in the 'live' branch. I've added a new feature locally and pushed it to the 'staging' branch.
My question is: How can I move the changes from the 'staging' branch to the 'live' branch and merge both branches together? What's the best way to do this?
I attempted to add a new feature to my website project by implementing it locally and pushing the changes to the 'staging' branch on Bitbucket. Now, I need to integrate these changes into the main 'live' branch to make them accessible on the live website. I'm seeking guidance on the best approach to merge the changes from the 'staging' branch into the 'live' branch effectively while ensuring the stability and integrity of the project.
You want staging to be as close to live as possible. Then you know when staging has passed an automated test suite with full coverage, live will work.
To guarantee this...
Changes to persistent data are done with data and schema migrations which are also tested on staging before being deployed to live.
You could do this manually, but you should take advantage of BitBucket Pipelines to do this for you.