Assembla Merge Requests adds a great value to code development process. Now it’s time to bring some more automation to the Code Review process. And here comes a new version of Protected Branches for GIT.
Previously, a feature development or a bugfix looked like:
- Create a new feature branch based on current production master
- Do some development and push code to new feature branch
- Go to Merge Requests Tab and create a Merge Request from new feature branch to master branch
Now, we have Protected Branches, where ‘master’ branch is protected by your Tech Leads, it looks as follows:
- No need to create a new feature branch, do development on master.
- Push code to origin master
What is going to happen behind the scenes when you push:
- A new temporary remote branch with ‘assembla-’ prefix will be created and your commits will be pushed to that branch, remote master will stay the same.
- A new merge request from this temporary branch to master will be created, you will see URL to MR in command line
This occurs in 2 cases:
- When you are a developer without write permission to ‘master’.
- When ‘Mandatory review’ checkbox is checked for ‘master’. In this case, all pushed code will go through review process, no matter if pusher has write permission or not.
To continue development on new automatic branch:
$ git fetch origin
$ git checkout assembla_1e65051188
$ echo “Hey, Merge Request Boss!” > WeContinueDevelopment # modify some file
$ git commit -a -m “We continue development to create new MR version”
$ git push origin assembla_1e65051188
We hope, you will enjoy the New Flow. To learn more about Assembla features or Sign Up for a Trial, click here.