Git
Pull requests
Propose, review and merge changes between branches.
Open a pull request
Push a branch, then in the Git portal open the repository's Pull requests → New pull request. You need git:write.
- Merge into and From: the target and source branches. They must differ, and only one pull request can be open for the same pair.
- Title: up to 150 characters.
- Description: Markdown, up to 10 KB.
Pull requests are numbered with issues, in one sequence per repository.
Review
A pull request has three tabs:
- Conversation: the description and comments. Anyone with
git:readcan comment. - Commits: what the source branch adds to the target, up to 50 commits.
- Files changed: unified diffs. Open pull requests compare the merge base with the source branch's latest commit, so new pushes show up on reload.
Merge
Merge (needs git:write) offers the strategies that apply to the branches right now:
| Strategy | Result |
|---|---|
| Squash and merge | One new commit on the target with all the changes. |
| Fast-forward | The target moves to the source's latest commit. Only possible when the target hasn't moved since the source branched. |
| Three-way merge | A merge commit joining both histories. |
Squash and three-way merges take a commit message (default: the title and number, like Add search (#12)) and record you as the author. If the source branch changed after you loaded the page, the merge fails instead of merging commits you haven't seen.
When no strategy can merge automatically because of conflicts, resolve them locally, push the source branch, and reload.
Close
Close is open to the pull request's author and to members with git:write. Closed pull requests can't be reopened; open a new one. Reopening is planned. Coming soon
Pull requests merged or closed outside the portal, for example by pushing a merge yourself, are marked merged or closed the next time the list or the pull request is opened.