Add documentation for MR's fast-forward merge method
This commit is contained in:
parent
ffa2c5d41e
commit
9cc8c631ba
|
@ -0,0 +1,35 @@
|
||||||
|
# Fast-forward merge requests
|
||||||
|
|
||||||
|
Retain a linear Git history and a way to accept merge requests without
|
||||||
|
creating merge commits.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
When the fast-forward merge ([`--ff-only`][ffonly]) setting is enabled, no merge
|
||||||
|
commits will be created and all merges are fast-forwarded, which means that
|
||||||
|
merging is only allowed if the branch could be fast-forwarded.
|
||||||
|
|
||||||
|
When a fast-forward merge is not possible, the user must rebase the branch manually.
|
||||||
|
|
||||||
|
## Use cases
|
||||||
|
|
||||||
|
Sometimes, a workflow policy might mandate a clean commit history without
|
||||||
|
merge commits. In such cases, the fast-forward merge is the perfect candidate.
|
||||||
|
|
||||||
|
## Enabling fast-forward merges
|
||||||
|
|
||||||
|
1. Navigate to your project's **Settings** and search for the 'Merge method'
|
||||||
|
1. Select the **Fast-forward merge** option
|
||||||
|
1. Hit **Save changes** for the changes to take effect
|
||||||
|
|
||||||
|
Now, when you visit the merge request page, you will be able to accept it
|
||||||
|
**only if a fast-forward merge is possible**.
|
||||||
|
|
||||||
|
![Fast forward merge request](img/ff_merge_mr.png)
|
||||||
|
|
||||||
|
If the target branch is ahead of the source branch, you need to rebase the
|
||||||
|
source branch before you will be able to do a fast-forward merge.
|
||||||
|
|
||||||
|
![Fast forward merge rebase](img/ff_merge_rebase.png)
|
||||||
|
|
||||||
|
[ffonly]: https://git-scm.com/docs/git-merge#git-merge---ff-only
|
|
@ -23,12 +23,13 @@ With GitLab merge requests, you can:
|
||||||
- Organize your issues and merge requests consistently throughout the project with [labels](../../project/labels.md)
|
- Organize your issues and merge requests consistently throughout the project with [labels](../../project/labels.md)
|
||||||
- Add a time estimation and the time spent with that merge request with [Time Tracking](../../../workflow/time_tracking.html#time-tracking)
|
- Add a time estimation and the time spent with that merge request with [Time Tracking](../../../workflow/time_tracking.html#time-tracking)
|
||||||
- [Resolve merge conflicts from the UI](#resolve-conflicts)
|
- [Resolve merge conflicts from the UI](#resolve-conflicts)
|
||||||
|
- Enable [fast-forward merge requests](https://docs.gitlab.com/ce/user/project/merge_requests/fast_forward_merge.html)
|
||||||
|
|
||||||
|
|
||||||
With **[GitLab Enterprise Edition][ee]**, you can also:
|
With **[GitLab Enterprise Edition][ee]**, you can also:
|
||||||
|
|
||||||
- View the deployment process across projects with [Multi-Project Pipeline Graphs](https://docs.gitlab.com/ee/ci/multi_project_pipeline_graphs.html#multi-project-pipeline-graphs) (available only in GitLab Enterprise Edition Premium)
|
- View the deployment process across projects with [Multi-Project Pipeline Graphs](https://docs.gitlab.com/ee/ci/multi_project_pipeline_graphs.html#multi-project-pipeline-graphs) (available only in GitLab Enterprise Edition Premium)
|
||||||
- Request [approvals](https://docs.gitlab.com/ee/user/project/merge_requests/merge_request_approvals.html) from your managers (available in GitLab Enterprise Edition Starter)
|
- Request [approvals](https://docs.gitlab.com/ee/user/project/merge_requests/merge_request_approvals.html) from your managers (available in GitLab Enterprise Edition Starter)
|
||||||
- Enable [fast-forward merge requests](https://docs.gitlab.com/ee/user/project/merge_requests/fast_forward_merge.html) (available in GitLab Enterprise Edition Starter)
|
|
||||||
- [Squash and merge](https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html) for a cleaner commit history (available in GitLab Enterprise Edition Starter)
|
- [Squash and merge](https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html) for a cleaner commit history (available in GitLab Enterprise Edition Starter)
|
||||||
- Enable [semi-linear history merge requests](https://docs.gitlab.com/ee/user/project/merge_requests/index.html#semi-linear-history-merge-requests) as another security layer to guarantee the pipeline is passing in the target branch (available in GitLab Enterprise Edition Starter)
|
- Enable [semi-linear history merge requests](https://docs.gitlab.com/ee/user/project/merge_requests/index.html#semi-linear-history-merge-requests) as another security layer to guarantee the pipeline is passing in the target branch (available in GitLab Enterprise Edition Starter)
|
||||||
- Analise the impact of your changes with [Code Quality reports](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality_diff.html) (available in GitLab Enterprise Edition Starter)
|
- Analise the impact of your changes with [Code Quality reports](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality_diff.html) (available in GitLab Enterprise Edition Starter)
|
||||||
|
@ -89,6 +90,15 @@ in a merged merge requests or a commit.
|
||||||
|
|
||||||
[Learn more about cherry-picking changes.](cherry_pick_changes.md)
|
[Learn more about cherry-picking changes.](cherry_pick_changes.md)
|
||||||
|
|
||||||
|
## Fast-forward merge requests
|
||||||
|
|
||||||
|
> Included in [GitLab Enterprise Edition Starter][products].
|
||||||
|
|
||||||
|
If you prefer a linear Git history and a way to accept merge requests without
|
||||||
|
creating merge commits, you can configure this on a per-project basis.
|
||||||
|
|
||||||
|
[Read more about fast-forward merge requests.](fast_forward_merge.md)
|
||||||
|
|
||||||
## Merge when pipeline succeeds
|
## Merge when pipeline succeeds
|
||||||
|
|
||||||
When reviewing a merge request that looks ready to merge but still has one or
|
When reviewing a merge request that looks ready to merge but still has one or
|
||||||
|
@ -254,4 +264,4 @@ git checkout origin/merge-requests/1
|
||||||
```
|
```
|
||||||
|
|
||||||
[protected branches]: ../protected_branches.md
|
[protected branches]: ../protected_branches.md
|
||||||
[ee]: https://about.gitlab.com/gitlab-ee/ "GitLab Enterprise Edition"
|
[ee]: https://about.gitlab.com/gitlab-ee/ "GitLab Enterprise Edition"
|
||||||
|
|
Loading…
Reference in New Issue