Git: Pull requests

If you’re working as a team member on some feature you probably will work in dedicated branch.

Once your work is done you want it to be tested – merge code to qa branch:

Screen Shot 2016-06-23 at 18.07.12

So you need to create pull request from your branch to qa:

Screen Shot 2016-06-23 at 18.11.29

Now a code can be merged by yourself or repo owner:

Screen Shot 2016-06-23 at 18.12.43

Screen Shot 2016-06-23 at 18.14.12

As you could notice, merging changes by developer can be dangerous.
This problem can be solved by limiting branch permissions:

Screen Shot 2016-06-23 at 19.04.22

Now user can’t merge from his feature branch to QA:

Screen Shot 2016-06-23 at 19.15.29

Screen Shot 2016-06-23 at 19.16.06

In case of GitHub, it’s almost the same. But GitHub doesn’t have pull request approvals which might be a problem if you need code approvals because of your workflow.

VCS table of contents