Pull Request
- Pull request is a proposal of potential changes
- Why this name?
- It's named
pull requestbecause it's like you are asking the other collaborators to pull your feature and avaliate it, a request to pull your changes from the remote branch and check it out and give feedbacks Pull requestis also when you want a main repository topullthe branch from your fork repository- Pull request is a
environment for discussion, after the discussion the feature branch can be merged into master or not - Existing pull request is automatically updated when new commits are pushed to remote
-
Pull requests can only be created in Github/GItlab website!
-
PR naming: [
branch]:Description of the feature - Merge pull request types
Create a merge commit: just like a conventional merge (3-way), all the history of commits are preserved and the commit will have 2 parents (from base and feature branches)Squash and mergeRebase and merge
Branch protection rules
Protected branchis a branch that has some rules, for example to require PR to have certainquantity of approvesbefore merging will be allowed- It's interesting to make
rulesfor the master branch and make itprotected(Settings/Branches) Rules- Require pull request reviews before merging
- Require status checks to pass before merging
- Require signed commits
- Require linear history
- Include administrators
- Allow force pushes
- Allow deletions