diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 09:10:40 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 09:10:40 +0000 |
commit | 0a921554d8c33ccbbd1f2edcee8cd70a0ecfd1a2 (patch) | |
tree | dfe8044b0be8bce7ecc962d9bc30225b6d2e0383 /doc/user/project/repository | |
parent | 4e5ac6eec9269941c0847200f8a915c2dbe56872 (diff) | |
download | gitlab-ce-0a921554d8c33ccbbd1f2edcee8cd70a0ecfd1a2.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/user/project/repository')
-rw-r--r-- | doc/user/project/repository/branches/index.md | 2 | ||||
-rw-r--r-- | doc/user/project/repository/img/web_editor_new_branch_dropdown_v14_1.png | bin | 12116 -> 0 bytes | |||
-rw-r--r-- | doc/user/project/repository/img/web_editor_new_branch_from_issue_create_button_v14_1.png | bin | 18848 -> 0 bytes | |||
-rw-r--r-- | doc/user/project/repository/img/web_editor_new_branch_from_issue_v14_1.png | bin | 10160 -> 0 bytes | |||
-rw-r--r-- | doc/user/project/repository/img/web_editor_new_branch_page_v14_1.png | bin | 12442 -> 0 bytes | |||
-rw-r--r-- | doc/user/project/repository/img/web_editor_new_push_widget.png | bin | 3388 -> 0 bytes | |||
-rw-r--r-- | doc/user/project/repository/img/web_editor_start_new_merge_request.png | bin | 4049 -> 0 bytes | |||
-rw-r--r-- | doc/user/project/repository/index.md | 3 | ||||
-rw-r--r-- | doc/user/project/repository/web_editor.md | 157 |
9 files changed, 34 insertions, 128 deletions
diff --git a/doc/user/project/repository/branches/index.md b/doc/user/project/repository/branches/index.md index 83885a5fc70..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) 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_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_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/index.md b/doc/user/project/repository/index.md index 13015c3f993..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 @@ -265,7 +265,6 @@ to fetch configuration from a project that is renamed or moved. - [Find files](file_finder.md) in a repository. - [Branches](branches/index.md). - [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/web_editor.md b/doc/user/project/repository/web_editor.md index 1c18824160f..b5b2b8aaae9 100644 --- a/doc/user/project/repository/web_editor.md +++ b/doc/user/project/repository/web_editor.md @@ -6,16 +6,27 @@ info: To determine the technical writer assigned to the Stage/Group associated w # Web Editor **(FREE)** -You can use the Web Editor to make changes directly from the UI instead of +You can use the Web Editor to make changes directly from the GitLab UI instead of cloning a project and using the command line. -From any project page, you can create a file, directory, branch, or tag. + +From the project dashboard or repository, you can: + +- [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). + +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. ## Create a file To create a text file in the Web Editor: 1. On the top bar, select **Main menu > Projects** and find your project. -1. On the project page, next to the branch name, select the plus icon (**{plus}**). +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. @@ -35,7 +46,7 @@ To edit a file in the Web Editor: 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). -## Preview Markdown +### Preview Markdown > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/378966) in GitLab 15.6. @@ -53,18 +64,17 @@ 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. -To highlight single or multiple lines in the Web Editor, add hash +To link to single or multiple lines in the Web Editor, add hash information to the filename segment of the URL. For example: - `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`. -To highlight a single line, you can also: +To link to a single line, you can also: 1. [Edit a file](#edit-a-file). 1. Select a line number. @@ -74,7 +84,7 @@ To highlight a single line, you can also: To upload a binary file in the Web Editor: 1. On the top bar, select **Main menu > Projects** and find your project. -1. On the project page, next to the branch name, select the plus icon (**{plus}**). +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**. @@ -84,131 +94,28 @@ To upload a binary file in the Web Editor: To create a directory in the Web Editor: 1. On the top bar, select **Main menu > Projects** and find your project. -1. On the project page, next to the branch name, select the plus icon (**{plus}**). +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**. -## 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. +## Create a branch -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. +To create a [branch](branches/index.md) in the Web Editor: -### 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) +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**. ## Create a tag -You can create tags to mark milestones such as production releases and -release candidates. To create a tag in the Web Editor: +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: 1. On the top bar, select **Main menu > Projects** and find your project. -1. On the project page, next to the branch name, select the plus icon (**{plus}**). +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. From the **Create from** dropdown list, select an existing branch, tag, or commit SHA. +1. Complete the fields. 1. Select **Create tag**. - -## Tips - -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. 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. - - ![Start a new merge request with these changes](img/web_editor_start_new_merge_request.png) - -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. - -<!-- ## Troubleshooting - -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. - -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. --> |