Workflow guidelines:
- Production branch is always production ready, deployable, 100% green test suite
- Staging branch is where all development and new feature works takes place
1.) Pull the latest staging codes from remote
1 |
git pull origin staging |
2.) Go to staging branch
1 |
git checkout staging |
3.) Create a new branch for your new awesome feature
1 |
git checkout -b my-awesome-feature-branch |
4.) Work now on your new awesome feature.
5.) Make sure you awseome-feature-branch is up-to-date with the staging branch
1 2 3 4 |
git checkout staging git pull origin staging git checkout my-awesome-feature-branch git rebase staging |
Resolve any conflicts that occur during rebase.
6.) Push your branch remotely and create pull request to staging branch for peer review
1 |
git push -u origin awesome-feature-branch |
Depending on peer review, keep pushing changes to the remote as needed.
7.) After review and approved, rebase your local awesome-branch again as you see in step #5 to keep it again up-to-date with the staging branch.
8.) Push your branch remotely and create pull request and ask to merge now to staging branch
1 |
git push -u origin awesome-feature-branch |
9.) All good. Remove all branches that have been merged into staging.
1 2 |
git branch -d awesome-feature-branch git push origin :awesome-feature-branch |
10.) Deploy the staging codes to staging server to make sure all working in the app.
11.) After all went good, merge the staging to production.
12.) Finally, deploy the production to production servers.
Be First to Comment