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:
So you need to create pull request from your branch to qa:
Now a code can be merged by yourself or repo owner:
As you could notice, merging changes by developer can be dangerous.
This problem can be solved by limiting branch permissions:
Now user can’t merge from his feature branch to QA:
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.