diff options
Diffstat (limited to 'doc/user/project/repository')
25 files changed, 122 insertions, 221 deletions
diff --git a/doc/user/project/repository/branches/index.md b/doc/user/project/repository/branches/index.md index a86e32b4721..4e3510c49b7 100644 --- a/doc/user/project/repository/branches/index.md +++ b/doc/user/project/repository/branches/index.md @@ -27,7 +27,7 @@ For more information on managing branches using the GitLab UI, see: - [Default branches](default.md): When you create a new [project](../../index.md), GitLab creates a default branch for the repository. You can change this setting at the project, subgroup, group, or instance level. -- [Create a branch](../web_editor.md#create-a-new-branch) +- [Create a branch](../web_editor.md#create-a-branch) - [Protected branches](../../protected_branches.md#protected-branches) - [Delete merged branches](#delete-merged-branches) - [Branch filter search box](#branch-filter-search-box) @@ -119,6 +119,30 @@ The Swap revisions feature allows you to swap the Source and Target revisions. W ![After swap revisions](img/swap_revisions_after_v13_12.png) +## View branches with configured protections **(FREE SELF)** + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/88279) in GitLab 15.1 with a flag named `branch_rules`. Disabled by default. + +FLAG: +On self-managed GitLab, by default this feature is not available. To make it available, ask an administrator to [enable the feature flag](../../../feature_flags.md) named `branch_rules`. +On GitLab.com, this feature is not available. +This feature is not ready for production use. + +Branches in your repository can be [protected](../../protected_branches.md) by limiting +who can push to a branch, require approval for those pushed changes, or merge those changes. +To help you track the protections for all branches, the **Branch rules overview** +page shows your branches with their configured rules. + +To view the **Branch rules overview** list: + +1. On the top bar, select **Main menu > Projects** and find your project. +1. On the left sidebar, select **Settings > Repository**. +1. Expand **Branch Rules** to view all branches with protections. +1. Select **Details** next to your desired branch to show information about its: + - [Branch protections](../../protected_branches.md). + - [Approval rules](../../merge_requests/approvals/rules.md). + - [Status checks](../../merge_requests/status_checks.md). + ## Troubleshooting ### Error: ambiguous `HEAD` branch exists diff --git a/doc/user/project/repository/git_history.md b/doc/user/project/repository/git_history.md index 08fe767f9c9..321b9a5eb53 100644 --- a/doc/user/project/repository/git_history.md +++ b/doc/user/project/repository/git_history.md @@ -21,6 +21,10 @@ When you select **History**, this information is displayed: If you hover over a commit in the UI, the precise date and time of the commit modification are shown. +The name and email information provided are retrieved from the +[Git configuration](https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration) +of the contributor when a commit is made. + ## Associated `git` command If you're running `git` from the command line, the equivalent command diff --git a/doc/user/project/repository/img/web_editor_line_link_v13_10.png b/doc/user/project/repository/img/web_editor_line_link_v13_10.png Binary files differdeleted file mode 100644 index 36347afcbe8..00000000000 --- a/doc/user/project/repository/img/web_editor_line_link_v13_10.png +++ /dev/null diff --git a/doc/user/project/repository/img/web_editor_new_branch_dropdown_v14_1.png b/doc/user/project/repository/img/web_editor_new_branch_dropdown_v14_1.png Binary files differdeleted file mode 100644 index df5e803d77a..00000000000 --- a/doc/user/project/repository/img/web_editor_new_branch_dropdown_v14_1.png +++ /dev/null diff --git a/doc/user/project/repository/img/web_editor_new_branch_from_issue_create_button_v14_1.png b/doc/user/project/repository/img/web_editor_new_branch_from_issue_create_button_v14_1.png Binary files differdeleted file mode 100644 index fae0fc1425b..00000000000 --- a/doc/user/project/repository/img/web_editor_new_branch_from_issue_create_button_v14_1.png +++ /dev/null diff --git a/doc/user/project/repository/img/web_editor_new_branch_from_issue_v14_1.png b/doc/user/project/repository/img/web_editor_new_branch_from_issue_v14_1.png Binary files differdeleted file mode 100644 index 732173d9c1b..00000000000 --- a/doc/user/project/repository/img/web_editor_new_branch_from_issue_v14_1.png +++ /dev/null diff --git a/doc/user/project/repository/img/web_editor_new_branch_page_v14_1.png b/doc/user/project/repository/img/web_editor_new_branch_page_v14_1.png Binary files differdeleted file mode 100644 index cba15631fa8..00000000000 --- a/doc/user/project/repository/img/web_editor_new_branch_page_v14_1.png +++ /dev/null diff --git a/doc/user/project/repository/img/web_editor_new_directory_dialog_v14_1.png b/doc/user/project/repository/img/web_editor_new_directory_dialog_v14_1.png Binary files differdeleted file mode 100644 index 1f7a6263d9a..00000000000 --- a/doc/user/project/repository/img/web_editor_new_directory_dialog_v14_1.png +++ /dev/null diff --git a/doc/user/project/repository/img/web_editor_new_directory_dropdown_v14_1.png b/doc/user/project/repository/img/web_editor_new_directory_dropdown_v14_1.png Binary files differdeleted file mode 100644 index bbdb9bca199..00000000000 --- a/doc/user/project/repository/img/web_editor_new_directory_dropdown_v14_1.png +++ /dev/null diff --git a/doc/user/project/repository/img/web_editor_new_file_dropdown_v14_1.png b/doc/user/project/repository/img/web_editor_new_file_dropdown_v14_1.png Binary files differdeleted file mode 100644 index 1a92555457a..00000000000 --- a/doc/user/project/repository/img/web_editor_new_file_dropdown_v14_1.png +++ /dev/null diff --git a/doc/user/project/repository/img/web_editor_new_file_editor_v14_1.png b/doc/user/project/repository/img/web_editor_new_file_editor_v14_1.png Binary files differdeleted file mode 100644 index 3c568e304b2..00000000000 --- a/doc/user/project/repository/img/web_editor_new_file_editor_v14_1.png +++ /dev/null diff --git a/doc/user/project/repository/img/web_editor_new_push_widget.png b/doc/user/project/repository/img/web_editor_new_push_widget.png Binary files differdeleted file mode 100644 index 8957b5d6a6b..00000000000 --- a/doc/user/project/repository/img/web_editor_new_push_widget.png +++ /dev/null diff --git a/doc/user/project/repository/img/web_editor_new_tag_dropdown.png b/doc/user/project/repository/img/web_editor_new_tag_dropdown.png Binary files differdeleted file mode 100644 index 33e8ed891b5..00000000000 --- a/doc/user/project/repository/img/web_editor_new_tag_dropdown.png +++ /dev/null diff --git a/doc/user/project/repository/img/web_editor_new_tag_page.png b/doc/user/project/repository/img/web_editor_new_tag_page.png Binary files differdeleted file mode 100644 index d6d9945397c..00000000000 --- a/doc/user/project/repository/img/web_editor_new_tag_page.png +++ /dev/null diff --git a/doc/user/project/repository/img/web_editor_start_new_merge_request.png b/doc/user/project/repository/img/web_editor_start_new_merge_request.png Binary files differdeleted file mode 100644 index 85f4769661a..00000000000 --- a/doc/user/project/repository/img/web_editor_start_new_merge_request.png +++ /dev/null diff --git a/doc/user/project/repository/img/web_editor_template_dropdown_buttons.png b/doc/user/project/repository/img/web_editor_template_dropdown_buttons.png Binary files differdeleted file mode 100644 index 4608843b1f4..00000000000 --- a/doc/user/project/repository/img/web_editor_template_dropdown_buttons.png +++ /dev/null diff --git a/doc/user/project/repository/img/web_editor_template_dropdown_first_file_v14_1.png b/doc/user/project/repository/img/web_editor_template_dropdown_first_file_v14_1.png Binary files differdeleted file mode 100644 index ecc4d8e8716..00000000000 --- a/doc/user/project/repository/img/web_editor_template_dropdown_first_file_v14_1.png +++ /dev/null diff --git a/doc/user/project/repository/img/web_editor_template_dropdown_mit_license_v14_1.png b/doc/user/project/repository/img/web_editor_template_dropdown_mit_license_v14_1.png Binary files differdeleted file mode 100644 index 5a5562ed38c..00000000000 --- a/doc/user/project/repository/img/web_editor_template_dropdown_mit_license_v14_1.png +++ /dev/null diff --git a/doc/user/project/repository/img/web_editor_upload_file_dialog_v14_1.png b/doc/user/project/repository/img/web_editor_upload_file_dialog_v14_1.png Binary files differdeleted file mode 100644 index 632f591e25a..00000000000 --- a/doc/user/project/repository/img/web_editor_upload_file_dialog_v14_1.png +++ /dev/null diff --git a/doc/user/project/repository/img/web_editor_upload_file_dropdown_v14_1.png b/doc/user/project/repository/img/web_editor_upload_file_dropdown_v14_1.png Binary files differdeleted file mode 100644 index ad949aae8ce..00000000000 --- a/doc/user/project/repository/img/web_editor_upload_file_dropdown_v14_1.png +++ /dev/null diff --git a/doc/user/project/repository/index.md b/doc/user/project/repository/index.md index 83389c15eba..3c33467df3f 100644 --- a/doc/user/project/repository/index.md +++ b/doc/user/project/repository/index.md @@ -15,7 +15,7 @@ Each [project](../index.md) contains a repository. To create a repository, you can: -- [Create a project](../../../user/project/working_with_projects.md#create-a-project) or +- [Create a project](../../../user/project/index.md#create-a-project) or - [Fork an existing project](forking_workflow.md). ## Add files to a repository @@ -264,9 +264,7 @@ to fetch configuration from a project that is renamed or moved. - [Repository API](../../../api/repositories.md). - [Find files](file_finder.md) in a repository. - [Branches](branches/index.md). -- [File templates](web_editor.md#template-dropdowns). - [Create a directory](web_editor.md#create-a-directory). -- [Start a merge request](web_editor.md#tips). - [Find file history](git_history.md). - [Identify changes by line (Git blame)](git_blame.md). - [Use Jupyter notebooks with GitLab](jupyter_notebooks/index.md). diff --git a/doc/user/project/repository/mirror/index.md b/doc/user/project/repository/mirror/index.md index 2b578977bd2..bc0073e6ec8 100644 --- a/doc/user/project/repository/mirror/index.md +++ b/doc/user/project/repository/mirror/index.md @@ -105,6 +105,20 @@ non-protected branches in the mirroring project are not mirrored and can diverge To use this option, select **Only mirror protected branches** when you create a repository mirror. +## Mirror specific branches + +> Mirroring branches matching a regex [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/102608) in GitLab 15.8 [with a flag](../../../../administration/feature_flags.md) named `mirror_only_branches_match_regex`. Disabled by default. + +FLAG: +On self-managed GitLab, by default the field `mirror_branch_regex` is not available. +To make it available, ask an administrator to [enable the feature flag](../../../../administration/feature_flags.md) +named `mirror_only_branches_match_regex`. +On GitLab.com, this feature is not available. + +To mirror only branches with names matching an [re2 regular expression](https://github.com/google/re2/wiki/Syntax), +enter a regular expression into the **Mirror specific branches** field. Branches with names that +do not match the regular expression are not mirrored. + ## Authentication methods for mirrors When you create a mirror, you must configure the authentication method for it. diff --git a/doc/user/project/repository/reducing_the_repo_size_using_git.md b/doc/user/project/repository/reducing_the_repo_size_using_git.md index 9c977e4da40..a8a79591e9e 100644 --- a/doc/user/project/repository/reducing_the_repo_size_using_git.md +++ b/doc/user/project/repository/reducing_the_repo_size_using_git.md @@ -63,7 +63,7 @@ To purge files from a GitLab repository: 1. Clone a fresh copy of the repository from the bundle using `--bare` and `--mirror` options: ```shell - git clone --bare --mirror /path/to/project.bundle + git clone --bare /path/to/project.bundle ``` 1. Go to the `project.git` directory: @@ -84,7 +84,7 @@ To purge files from a GitLab repository: ```shell # Using git filter-repo git filter-repo --analyze - head .git/filter-repo/analysis/*-{all,deleted}-sizes.txt + head filter-repo/analysis/*-{all,deleted}-sizes.txt # Using git-sizer git-sizer @@ -117,7 +117,7 @@ To purge files from a GitLab repository: You can use the following command to back up each `commit-map` file: ```shell - cp .git/filter-repo/commit-map ./_filter_repo_commit_map_$(date +%s) + cp filter-repo/commit-map ./_filter_repo_commit_map_$(date +%s) ``` Repeat this step and all following steps (including the [repository cleanup](#repository-cleanup) step) diff --git a/doc/user/project/repository/ssh_signed_commits/index.md b/doc/user/project/repository/ssh_signed_commits/index.md index 06affa54a51..85d2ce1d480 100644 --- a/doc/user/project/repository/ssh_signed_commits/index.md +++ b/doc/user/project/repository/ssh_signed_commits/index.md @@ -6,12 +6,8 @@ info: To determine the technical writer assigned to the Stage/Group associated w # Sign commits with SSH keys **(FREE)** -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/343879) in GitLab 15.7 [with a flag](../../../../administration/feature_flags.md) named `ssh_commit_signatures`. Enabled by default. - -FLAG: -On self-managed GitLab, by default this feature is available. To hide the feature, -ask an administrator to [disable the feature flag](../../../../administration/feature_flags.md) named `ssh_commit_signatures`. -On GitLab.com, this feature is available. +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/343879) in GitLab 15.7 [with a flag](../../../../administration/feature_flags.md) named `ssh_commit_signatures`. Enabled by default. +> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/384202) in GitLab 15.8. Feature flag `ssh_commit_signatures` removed. Use SSH keys to sign Git commits in the same manner as [GPG signed commits](../gpg_signed_commits/index.md). When you sign commits diff --git a/doc/user/project/repository/web_editor.md b/doc/user/project/repository/web_editor.md index cc89ca0fb1a..b5b2b8aaae9 100644 --- a/doc/user/project/repository/web_editor.md +++ b/doc/user/project/repository/web_editor.md @@ -4,253 +4,118 @@ group: Editor info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- -# GitLab Web Editor **(FREE)** +# Web Editor **(FREE)** -Sometimes it's easier to make quick changes directly from the GitLab interface -than to clone the project and use the Git command-line tool. In this feature -highlight, we look at how you can create a new file, directory, branch, or -tag from the file browser. All of these actions are available from a single -dropdown list. +You can use the Web Editor to make changes directly from the GitLab UI instead of +cloning a project and using the command line. -## Create a file - -From a project's files page, select the '+' button to the right of the branch selector. -Choose **New file** from the dropdown list. -![New file dropdown list](img/web_editor_new_file_dropdown_v14_1.png) - -Enter a filename in the **Filename** box. Then, add file content in the editor -area. Add a descriptive commit message and choose a branch. The branch field -defaults to the branch you were viewing in the file browser. If you enter -a new branch name, a checkbox displays, allowing you to start a new merge -request after you commit the changes. +From the project dashboard or repository, you can: -When you are satisfied with your new file, select **Commit Changes** at the bottom. +- [Create a file](#create-a-file). +- [Edit a file](#edit-a-file). +- [Upload a file](#upload-a-file). +- [Create a directory](#create-a-directory). +- [Create a branch](#create-a-branch). +- [Create a tag](#create-a-tag). -![Create file editor](img/web_editor_new_file_editor_v14_1.png) +Your [primary email address](../../../user/profile/index.md#change-the-email-displayed-on-your-commits) +is used by default for any change you commit through the Web Editor. -### Shortcuts +## Create a file -You can use shortcuts when editing a file through the Web Editor. It uses the same shortcuts -as the Web IDE. For details, read the documentation for [Command Palette](../web_ide/index.md#command-palette). +To create a text file in the Web Editor: -### Template dropdowns +1. On the top bar, select **Main menu > Projects** and find your project. +1. From the project dashboard or repository, next to the branch name, select the plus icon (**{plus}**). +1. From the dropdown list, select **New file**. +1. Complete the fields. + - From the **Select a template type** dropdown list, you can apply a template to the new file. + - To create a merge request with the new file, ensure the **Start a new merge request with these changes** checkbox is selected. +1. Select **Commit changes**. -When starting a new project, there are some common files that the new project -might need. GitLab displays a message to help you: +## Edit a file -![First file for your project](img/web_editor_template_dropdown_first_file_v14_1.png) +To edit a file in the Web Editor: -When selecting either `LICENSE` or `.gitignore` and so on, a dropdown displays -to provide you a template that may be suitable for your project: +1. On the top bar, select **Main menu > Projects** and find your project. +1. Go to your file. +1. Next to the display buttons, select **Edit**. -![MIT license selected](img/web_editor_template_dropdown_mit_license_v14_1.png) +### Keyboard shortcuts -The license, changelog, contribution guide, or `.gitlab-ci.yml` file can also -be added through a button on the project page. In this example, the license -has already been created, which creates a link to the license itself. +When you [edit a file](#edit-a-file) in the Web Editor, you can use the same keyboard shortcuts for the Web IDE. +See the [available shortcuts](../../shortcuts.md#web-ide). -![New file button](img/web_editor_template_dropdown_buttons.png) +### Preview Markdown -NOTE: -The **Set up CI/CD** button does not appear on an empty repository. For the button -to display, add a file to your repository. +> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/378966) in GitLab 15.6. -## Preview Markdown +To preview Markdown content in the Web Editor: -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/378966) in GitLab 15.6. +1. [Edit a file](#edit-a-file). +1. Do one of the following: + - Select the **Preview** tab. + - From the context menu, select **Preview Markdown**. -To preview Markdown content in the Web Editor, select the **Preview** tab. -In this tab, you can see a live Markdown preview that updates as you type alongside your content. +In the **Preview** tab, you can see a live Markdown preview alongside your content. To close the preview panel, do one of the following: - Select the **Write** tab. - From the context menu, select **Hide Live Preview**. -## Highlight lines +### Link to specific lines -> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56159) in GitLab 13.10 for GitLab SaaS instances. -> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56159) in GitLab 13.11 for self-managed instances. +> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56159) in GitLab 13.11. -Web Editor enables you to highlight a single line by adding specially formatted -hash information to the file path segment of the URL. For example, the file path segment -`MY_FILE.js#L3` instructs the Web Editor to highlight line 3. +To link to single or multiple lines in the Web Editor, add hash +information to the filename segment of the URL. For example: -The Web Editor also enables you to highlight multiple lines using a similar pattern. In -this case, the file path segment `MY_FILE.js#L3-10` instructs the Web Editor to -highlight lines 3 to 10 of the file. +- `MY_FILE.js#L3` highlights line 3 in `MY_FILE.js`. +- `MY_FILE.js#L3-10` highlights lines 3 to 10 in `MY_FILE.js`. -You don't need to construct these lines manually. Instead, you can: +To link to a single line, you can also: -1. Hover over the number of a line you want to be highlighted when sharing. -1. Right-click the number with your mouse. -1. Select **Copy Link Address** in the context menu. - - ![Link to a line](img/web_editor_line_link_v13_10.png) +1. [Edit a file](#edit-a-file). +1. Select a line number. ## Upload a file -The ability to create a file is great when the content is text. However, this -doesn't work well for binary data such as images, PDFs, or other binary file types. In -this case, you need to upload a file. - -From a project's files page, select the '+' button to the right of the branch -selector. Choose **Upload file** from the dropdown: - -![Upload file dropdown list](img/web_editor_upload_file_dropdown_v14_1.png) +To upload a binary file in the Web Editor: -After the upload dialog pops up, there are two ways to upload your file. Either -drag and drop a file on the popup or use the **click to upload** link. After you -select a file to upload, a file preview displays. - -Enter a commit message, choose a branch, and select **Upload file** when you are -ready. - -![Upload file dialog](img/web_editor_upload_file_dialog_v14_1.png) +1. On the top bar, select **Main menu > Projects** and find your project. +1. From the project dashboard or repository, next to the branch name, select the plus icon (**{plus}**). +1. From the dropdown list, select **Upload file**. +1. Complete the fields. To create a merge request with the uploaded file, ensure the **Start a new merge request with these changes** toggle is turned on. +1. Select **Upload file**. ## Create a directory -To keep files in the repository organized it is often helpful to create a new -directory. - -From a project's files page, select the plus button (`+`) to the right of the branch selector. -Choose **New directory** from the dropdown. - -![New directory dropdown list](img/web_editor_new_directory_dropdown_v14_1.png) - -In the new directory dialog, enter a directory name, a commit message, and choose -the target branch. Select **Create directory** to finish. - -![New directory dialog](img/web_editor_new_directory_dialog_v14_1.png) - -## Create a new branch - -There are multiple ways to create a branch from the GitLab web interface. - -NOTE: -Use [branch naming patterns](branches/index.md#naming) to streamline merge request creation. - -### Create a new branch from an issue - -> The **Create merge request** button [changed](https://gitlab.com/gitlab-org/gitlab/-/issues/349566) to open the merge request creation form in GitLab 14.8. - -If your development workflow requires an issue for every merge -request, you can create a branch directly from the issue to speed the process up. -The new branch, and later its merge request, are marked as related to this issue. -After merging the merge request, the issue is closed automatically, unless [automatic issue closing is disabled](../issues/managing_issues.md#disable-automatic-issue-closing). -You can see a **Create merge request** dropdown below the issue description. - -NOTE: -In GitLab 14.8 and later, selecting **Create merge request** -[redirects to the merge request creation form](https://gitlab.com/gitlab-org/gitlab/-/issues/349566) -instead of immediately creating the merge request. - -The **Create merge request** button doesn't display if: - -- A branch with the same name already exists. -- A merge request already exists for this branch. -- Your project has an active fork relationship. -- Your project is private and the issue is confidential. - -To make this button appear, one possible workaround is to -[remove your project's fork relationship](../settings/index.md#remove-a-fork-relationship). -After removal, the fork relationship cannot be restored. This project can no longer -be able to receive or send merge requests to the source project, or other forks. - -![Create Button](img/web_editor_new_branch_from_issue_create_button_v14_1.png) - -This dropdown contains the options **Create merge request and branch** and **Create branch**. - -![New Branch Button](img/web_editor_new_branch_from_issue_v14_1.png) - -After selecting one of these options, a new branch or branch and merge request -is created based on your project's [default branch](branches/default.md). -The branch name is based on an internal ID, and the issue title. The example -screenshot above creates a branch named -`2-make-static-site-auto-deploy-and-serve`. - -When you select the **Create branch** button in an empty -repository project, GitLab performs these actions: - -- Creates a default branch. -- Commits a blank `README.md` file to it. -- Creates and redirects you to a new branch based on the issue title. -- _If your project is [configured with a deployment service](../integrations/index.md) like Kubernetes,_ - GitLab prompts you to set up [auto deploy](../../../topics/autodevops/stages.md#auto-deploy) - by helping you create a `.gitlab-ci.yml` file. - -After the branch is created, you can edit files in the repository to fix -the issue. When a merge request is created based on the newly-created branch, -the description field displays the [issue closing pattern](../issues/managing_issues.md#closing-issues-automatically) -`Closes #ID`, where `ID` is the ID of the issue. This closes the issue when the -merge request is merged. - -### Create a new branch from a project's dashboard - -If you want to make changes to several files before creating a new merge -request, you can create a new branch upfront. - -1. From a project's files page, choose **New branch** from the dropdown list. - - ![New branch dropdown list](img/web_editor_new_branch_dropdown_v14_1.png) - -1. Enter a new **Branch name**. -1. Optional. Change the **Create from** field to choose which branch, tag, or - commit SHA this new branch originates from. This field autocompletes if you - start typing an existing branch or tag. -1. To return to the file browser on this new branch, select **Create branch**. - - ![New branch page](img/web_editor_new_branch_page_v14_1.png) - -You can now make changes to any files, as needed. When you're ready to merge -the changes back to your [default branch](branches/default.md), you can use the widget at the top of the screen. -This widget only appears for a period of time after you create the branch or -modify files. - -![New push widget](img/web_editor_new_push_widget.png) - -## Create a new tag - -Tags help you mark major milestones such as production releases and -release candidates. You can create a tag from a branch or a commit -SHA: - -1. From a project's files page, choose **New tag** from the dropdown list. - - ![New tag dropdown list](img/web_editor_new_tag_dropdown.png) - -1. Give the tag a name such as `v1.0.0`. -1. Choose the branch or SHA from which you want to create this new tag. -1. Optional. Add a message and release notes. The release notes section supports - Markdown format. -1. Optional. Upload an attachment. -1. Select **Create tag**. GitLab redirects you to the tag list page. - - ![New tag page](img/web_editor_new_tag_page.png) - -## Tips +To create a directory in the Web Editor: -When creating or uploading a new file or creating a new directory, you can -trigger a new merge request rather than committing directly to your default branch: +1. On the top bar, select **Main menu > Projects** and find your project. +1. From the project dashboard or repository, next to the branch name, select the plus icon (**{plus}**). +1. From the dropdown list, select **New directory**. +1. Complete the fields. To create a merge request with the new directory, ensure the **Start a new merge request with these changes** toggle is turned on. +1. Select **Create directory**. -1. Enter a new branch name in the **Target branch** field. -1. GitLab displays the **Start a new merge request with these changes** checkbox. -1. Commit your changes, and GitLab redirects you to a new merge request form. +## Create a branch - ![Start a new merge request with these changes](img/web_editor_start_new_merge_request.png) +To create a [branch](branches/index.md) in the Web Editor: -If you'd prefer to not use your primary email address for commits created -through the web editor, you can choose to use another of your linked email -addresses from the **User Settings > Edit Profile** page. +1. On the top bar, select **Main menu > Projects** and find your project. +1. From the project dashboard or repository, next to the branch name, select the plus icon (**{plus}**). +1. From the dropdown list, select **New branch**. +1. Complete the fields. +1. Select **Create branch**. -<!-- ## Troubleshooting +## Create a tag -Include any troubleshooting steps that you can foresee. If you know beforehand what issues -one might have when setting this up, or when something is changed, or on upgrading, it's -important to describe those, too. Think of things that may go wrong and include them here. -This is important to minimize requests for support, and to avoid doc comments with -questions that you know someone might ask. +You can create [tags](../../../topics/git/tags.md) to mark milestones such as +production releases and release candidates. To create a tag in the Web Editor: -Each scenario can be a third-level heading, for example `### Getting error message X`. -If you have none to add when creating a doc, leave this section in place -but commented out to help encourage others to add to it in the future. --> +1. On the top bar, select **Main menu > Projects** and find your project. +1. From the project dashboard or repository, next to the branch name, select the plus icon (**{plus}**). +1. From the dropdown list, select **New tag**. +1. Complete the fields. +1. Select **Create tag**. |