Commit 5493702e authored by Russell Dickenson's avatar Russell Dickenson

Merge branch 'docs-20200115-getting-started' into 'master'

Make getting-started guide adhere to style guide

See merge request gitlab-org/gitlab!23116
parents 403d5d6f 670a7a1d
...@@ -26,7 +26,7 @@ it to GitLab, you have the option to create a **Merge Request**, ...@@ -26,7 +26,7 @@ it to GitLab, you have the option to create a **Merge Request**,
which is essentially a _request_ to merge one branch into another. which is essentially a _request_ to merge one branch into another.
The branch you added your changes into is called _source branch_ The branch you added your changes into is called _source branch_
while the branch you'll request to merge your changes into is while the branch you request to merge your changes into is
called _target branch_. called _target branch_.
The target branch can be the default or any other branch, depending The target branch can be the default or any other branch, depending
...@@ -46,19 +46,18 @@ Learn the various ways to [create a merge request](creating_merge_requests.md). ...@@ -46,19 +46,18 @@ Learn the various ways to [create a merge request](creating_merge_requests.md).
## What you can do with merge requests ## What you can do with merge requests
When you start a new merge request, you'll have the following When you start a new merge request, you can immediately include the following
options to include straightaway (you can also add them later by options, or add them later by clicking the **Edit** button on the merge
clicking the **Edit** button on the merge request's page at the request's page at the top-right side:
top-right side):
- [Assign](#assignee) the merge request to a colleague for review.With GitLab Starter and higher tiers, you can [assign it to more than one person at a time](#multiple-assignees-starter). - [Assign](#assignee) the merge request to a colleague for review. With GitLab Starter and higher tiers, you can [assign it to more than one person at a time](#multiple-assignees-starter).
- Set a [milestone](../milestones/index.md) to track time-sensitive changes. - Set a [milestone](../milestones/index.md) to track time-sensitive changes.
- Add [labels](../labels.md) to help contextualize and filter your merge requests over time. - Add [labels](../labels.md) to help contextualize and filter your merge requests over time.
- Require [approval](merge_request_approvals.md) from your team. **(STARTER)** - Require [approval](merge_request_approvals.md) from your team. **(STARTER)**
- [Close issues automatically](#merge-requests-to-close-issues) when it's merged. - [Close issues automatically](#merge-requests-to-close-issues) when they are merged.
- Enable the [delete source branch when merge request is accepted](#deleting-the-source-branch) option to keep your repository clean. - Enable the [delete source branch when merge request is accepted](#deleting-the-source-branch) option to keep your repository clean.
- Enable the [squash commits when merge request is accepted](squash_and_merge.md) option to combine all the commits into one before merging, thus keep a clean commit history in your repository. - Enable the [squash commits when merge request is accepted](squash_and_merge.md) option to combine all the commits into one before merging, thus keep a clean commit history in your repository.
- Set the merge request as a [Work In Progress (WIP)](work_in_progress_merge_requests.md) to avoid accidental merges before it's ready. - Set the merge request as a [Work In Progress (WIP)](work_in_progress_merge_requests.md) to avoid accidental merges before it is ready.
Once you have created the merge request, you can also: Once you have created the merge request, you can also:
...@@ -98,12 +97,13 @@ to indicate everyone that is reviewing or accountable for it. ...@@ -98,12 +97,13 @@ to indicate everyone that is reviewing or accountable for it.
To assign multiple assignees to a merge request: To assign multiple assignees to a merge request:
1. From a merge request, expand the right sidebar and locate the **Assignees** section. 1. From a merge request, expand the right sidebar and locate the **Assignees** section.
1. Click on **Edit** and from the dropdown menu, select as many users as you want to assign the merge request to. 1. Click on **Edit** and from the dropdown menu, select as many users as you want
to assign the merge request to.
Similarly, assignees are removed by deselecting them from the same Similarly, assignees are removed by deselecting them from the same
dropdown menu. dropdown menu.
It's also possible to manage multiple assignees: It is also possible to manage multiple assignees:
- When creating a merge request. - When creating a merge request.
- Using [quick actions](../quick_actions.md#quick-actions-for-issues-merge-requests-and-epics). - Using [quick actions](../quick_actions.md#quick-actions-for-issues-merge-requests-and-epics).
...@@ -111,7 +111,7 @@ It's also possible to manage multiple assignees: ...@@ -111,7 +111,7 @@ It's also possible to manage multiple assignees:
### Merge requests to close issues ### Merge requests to close issues
If the merge request is being created to resolve an issue, you can If the merge request is being created to resolve an issue, you can
add a note in the description which will set it to add a note in the description which sets it to
[automatically close the issue](../issues/managing_issues.md#closing-issues-automatically) [automatically close the issue](../issues/managing_issues.md#closing-issues-automatically)
when merged. when merged.
...@@ -122,27 +122,30 @@ to prevent confidential information from being exposed. ...@@ -122,27 +122,30 @@ to prevent confidential information from being exposed.
### Deleting the source branch ### Deleting the source branch
When creating a merge request, select the "Delete source branch When creating a merge request, select the
when merge request accepted" option and the source branch will be **Delete source branch when merge request accepted** option, and the source
deleted when the merge request is merged. To make this option branch is deleted when the merge request is merged. To make this option
enabled by default for all new merge requests, enable it in the enabled by default for all new merge requests, enable it in the
[project's settings](../settings/index.md#merge-request-settings). [project's settings](../settings/index.md#merge-request-settings).
This option is also visible in an existing merge request next to This option is also visible in an existing merge request next to
the merge request button and can be selected/deselected before merging. the merge request button and can be selected or deselected before merging.
It's only visible to users with [Maintainer permissions](../../permissions.md) It is only visible to users with [Maintainer permissions](../../permissions.md)
in the source project. in the source project.
If the user viewing the merge request does not have the correct If the user viewing the merge request does not have the correct
permissions to delete the source branch and the source branch permissions to delete the source branch and the source branch
is set for deletion, the merge request widget will show the is set for deletion, the merge request widget displays the
**Deletes source branch** text. **Deletes source branch** text.
![Delete source branch status](img/remove_source_branch_status.png) ![Delete source branch status](img/remove_source_branch_status.png)
## Recommendations and best practices for Merge Requests ## Recommendations and best practices for Merge Requests
- When working locally in your branch, add multiple commits and only push when you're done, so GitLab will run only one pipeline for all the commits pushed at once. By doing so, you save pipeline minutes. - When working locally in your branch, add multiple commits and only push when
you're done, so GitLab runs only one pipeline for all the commits pushed
at once. By doing so, you save pipeline minutes.
- Delete feature branches on merge or after merging them to keep your repository clean. - Delete feature branches on merge or after merging them to keep your repository clean.
- Take one thing at a time and ship the smallest changes possible. By doing so, you'll have faster reviews and your changes will be less prone to errors. - Take one thing at a time and ship the smallest changes possible. By doing so,
- Don't use capital letters nor special chars in branch names. you'll have faster reviews and your changes will be less prone to errors.
- Do not use capital letters nor special chars in branch names.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment