From 99ece9fc6586a4b36af49fe8dbac97f2d2c8af62 Mon Sep 17 00:00:00 2001 From: Brendan Lynch Date: Mon, 14 Oct 2024 09:49:08 +0200 Subject: [PATCH 1/6] Initial commit to add delete a file content --- doc/user/project/repository/web_editor.md | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/doc/user/project/repository/web_editor.md b/doc/user/project/repository/web_editor.md index 60a4e7721d5764..1caffa0a9ab08e 100644 --- a/doc/user/project/repository/web_editor.md +++ b/doc/user/project/repository/web_editor.md @@ -99,6 +99,30 @@ To upload a file in the Web Editor: that's not your repository's [default branch](branches/default.md). 1. Select **Upload file**. +## Delete a file + +To delete a file in the Web Editor: + +1. On the left sidebar, select **Search or go to** and find your project. +1. Go to the file you want to delete. +1. Select **Delete**. +1. In the **Commit message**, enter a reason for the commit. +1. Choose one of the following options: + - Commit changes to the current branch only: + 1. Select **Commit to the `` branch.** + 1. Select **Commit changes**. + - Commit changes to the current branch and create a merge request: + 1. Select **Commit to the `` branch and create a merge request.** + 1. Select **Commit changes**. + 1. On the **Merge requests** page, fill out the fields. + 1. Select **Create merge request**. + - Commit changes to a new branch and create a merge request: + 1. Select **Commit to a new branch and create a merge request.** + 1. Enter a branch name. + 1. Select **Commit changes**. + 1. On the **Merge requests** page, fill out the fields. + 1. Select **Create merge request**. + ## Create a directory To create a directory in the Web Editor: -- GitLab From 5c8617b909a1d842a305d80d4bac19fa7580ac29 Mon Sep 17 00:00:00 2001 From: Brendan Lynch Date: Mon, 14 Oct 2024 16:04:06 +0200 Subject: [PATCH 2/6] Update task to match current UI state --- doc/user/project/repository/web_editor.md | 48 +++++++++++++++++------ 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/doc/user/project/repository/web_editor.md b/doc/user/project/repository/web_editor.md index 1caffa0a9ab08e..cc17dadfdf1351 100644 --- a/doc/user/project/repository/web_editor.md +++ b/doc/user/project/repository/web_editor.md @@ -101,25 +101,51 @@ To upload a file in the Web Editor: ## Delete a file +NOTE: +If you do not have the necessary [permissions](../../permissions.md), it is not possible to delete a file from a [protected branch](../protected_branches.md). + To delete a file in the Web Editor: 1. On the left sidebar, select **Search or go to** and find your project. 1. Go to the file you want to delete. 1. Select **Delete**. 1. In the **Commit message**, enter a reason for the commit. -1. Choose one of the following options: - - Commit changes to the current branch only: - 1. Select **Commit to the `` branch.** - 1. Select **Commit changes**. - - Commit changes to the current branch and create a merge request: - 1. Select **Commit to the `` branch and create a merge request.** - 1. Select **Commit changes**. +1. Select one of the following options: + - Delete a file from the prefilled target branch: + 1. Select **Delete file**. + - Delete a file from a new branch and commit changes: + 1. In **Target branch**, enter a branch name. + 1. Ensure the **Start a new merge request with these changes** toggle is not selected. + 1. Select **Delete file**. + - Delete a file from a new branch, commit changes, and create a merge request: + 1. In **Target branch**, enter a branch name. + 1. Ensure the **Start a new merge request with these changes** toggle is selected. + 1. Select **Delete file**. 1. On the **Merge requests** page, fill out the fields. 1. Select **Create merge request**. - - Commit changes to a new branch and create a merge request: - 1. Select **Commit to a new branch and create a merge request.** - 1. Enter a branch name. - 1. Select **Commit changes**. + +### Delete a file tracked by LFS + +NOTE: +If you do not have the necessary [permissions](../../permissions.md), it is not possible to delete an LFS tracked file from a [protected branch](../protected_branches.md). + +To delete a file tracked by [Git LFS](../../../topics/git/lfs/index.md) in the Web Editor: + +1. On the left sidebar, select **Search or go to** and find your project. +1. Go to the LFS tracked file you want to delete. +1. Select **Delete**. +1. Select **Continue**. +1. Select one of the following options: + - Delete a file from the prefilled target branch: + 1. Select **Delete file**. + - Delete a file from a new branch and commit changes: + 1. In **Target branch**, enter a branch name. + 1. Ensure the **Start a new merge request with these changes** toggle is not selected. + 1. Select **Delete file**. + - Delete a file from a new branch, commit changes, and create a merge request: + 1. In **Target branch**, enter a branch name. + 1. Ensure the **Start a new merge request with these changes** toggle is selected. + 1. Select **Delete file**. 1. On the **Merge requests** page, fill out the fields. 1. Select **Create merge request**. -- GitLab From 2fef58c39c39ab75f89fbc3f0c5d19a22283c0be Mon Sep 17 00:00:00 2001 From: Brendan Lynch Date: Fri, 18 Oct 2024 11:55:02 +0200 Subject: [PATCH 3/6] Updated process steps to match new UI --- doc/user/project/repository/web_editor.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/doc/user/project/repository/web_editor.md b/doc/user/project/repository/web_editor.md index cc17dadfdf1351..87117595a71b4b 100644 --- a/doc/user/project/repository/web_editor.md +++ b/doc/user/project/repository/web_editor.md @@ -109,21 +109,23 @@ To delete a file in the Web Editor: 1. On the left sidebar, select **Search or go to** and find your project. 1. Go to the file you want to delete. 1. Select **Delete**. -1. In the **Commit message**, enter a reason for the commit. +1. In the **Commit message** field, enter a reason for the commit. 1. Select one of the following options: - Delete a file from the prefilled target branch: - 1. Select **Delete file**. + 1. Select **Commit changes**. - Delete a file from a new branch and commit changes: - 1. In **Target branch**, enter a branch name. - 1. Ensure the **Start a new merge request with these changes** toggle is not selected. - 1. Select **Delete file**. + 1. Select **Commit to a different branch**. + 1. Enter a branch name. + 1. Ensure the **Create a merge request for this change** is not selected. + 1. Select **Commit changes**. - Delete a file from a new branch, commit changes, and create a merge request: 1. In **Target branch**, enter a branch name. - 1. Ensure the **Start a new merge request with these changes** toggle is selected. - 1. Select **Delete file**. - 1. On the **Merge requests** page, fill out the fields. - 1. Select **Create merge request**. + 1. Select **Commit to a different branch**. + 1. Enter a branch name. + 1. Ensure the **Create a merge request for this change** is selected. + 1. Select **Commit changes**. + ## Create a directory -- GitLab From d47cefce47127111f704bc8a1e77d059511efbcb Mon Sep 17 00:00:00 2001 From: Brendan Lynch Date: Wed, 23 Oct 2024 15:42:34 +0200 Subject: [PATCH 4/6] Update "different" to "new" to match the UI --- doc/user/project/repository/web_editor.md | 31 ++--------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/doc/user/project/repository/web_editor.md b/doc/user/project/repository/web_editor.md index 87117595a71b4b..2e70b691893fa7 100644 --- a/doc/user/project/repository/web_editor.md +++ b/doc/user/project/repository/web_editor.md @@ -114,44 +114,17 @@ To delete a file in the Web Editor: - Delete a file from the prefilled target branch: 1. Select **Commit changes**. - Delete a file from a new branch and commit changes: - 1. Select **Commit to a different branch**. + 1. Select **Commit to a new branch**. 1. Enter a branch name. 1. Ensure the **Create a merge request for this change** is not selected. 1. Select **Commit changes**. - Delete a file from a new branch, commit changes, and create a merge request: 1. In **Target branch**, enter a branch name. - 1. Select **Commit to a different branch**. + 1. Select **Commit to a new branch**. 1. Enter a branch name. 1. Ensure the **Create a merge request for this change** is selected. 1. Select **Commit changes**. - - ## Create a directory To create a directory in the Web Editor: -- GitLab From 10d29ef224c859ebb403182ee8e03ef28957866d Mon Sep 17 00:00:00 2001 From: Brendan Lynch Date: Thu, 24 Oct 2024 07:58:33 +0000 Subject: [PATCH 5/6] Apply 8 suggestion(s) to 1 file(s) Co-authored-by: Ashraf Khamis --- doc/user/project/repository/web_editor.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/user/project/repository/web_editor.md b/doc/user/project/repository/web_editor.md index 2e70b691893fa7..96b1565994bbb2 100644 --- a/doc/user/project/repository/web_editor.md +++ b/doc/user/project/repository/web_editor.md @@ -102,27 +102,27 @@ To upload a file in the Web Editor: ## Delete a file NOTE: -If you do not have the necessary [permissions](../../permissions.md), it is not possible to delete a file from a [protected branch](../protected_branches.md). +You cannot delete a file from a [protected branch](../protected_branches.md) +without the necessary [permissions](../../permissions.md). To delete a file in the Web Editor: 1. On the left sidebar, select **Search or go to** and find your project. 1. Go to the file you want to delete. 1. Select **Delete**. -1. In the **Commit message** field, enter a reason for the commit. -1. Select one of the following options: - - Delete a file from the prefilled target branch: - 1. Select **Commit changes**. - - Delete a file from a new branch and commit changes: +1. In **Commit message**, enter a reason for the commit. +1. Choose between the following options: + - To Delete a file from the prefilled target branch, select **Commit changes**. + - To delete a file from a new branch and commit changes: 1. Select **Commit to a new branch**. 1. Enter a branch name. - 1. Ensure the **Create a merge request for this change** is not selected. + 1. Ensure the **Create a merge request for this change** checkbox is cleared. 1. Select **Commit changes**. - - Delete a file from a new branch, commit changes, and create a merge request: + - To delete a file from a new branch, commit changes, and create a merge request: 1. In **Target branch**, enter a branch name. 1. Select **Commit to a new branch**. 1. Enter a branch name. - 1. Ensure the **Create a merge request for this change** is selected. + 1. Ensure the **Create a merge request for this change** checkbox is selected. 1. Select **Commit changes**. ## Create a directory -- GitLab From b148a61c5e32272686cae3d813a78ab451a0e8b6 Mon Sep 17 00:00:00 2001 From: Ashraf Khamis Date: Thu, 24 Oct 2024 08:21:29 +0000 Subject: [PATCH 6/6] Apply 1 suggestion(s) to 1 file(s) --- doc/user/project/repository/web_editor.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/user/project/repository/web_editor.md b/doc/user/project/repository/web_editor.md index 96b1565994bbb2..070bfdc8500396 100644 --- a/doc/user/project/repository/web_editor.md +++ b/doc/user/project/repository/web_editor.md @@ -112,7 +112,7 @@ To delete a file in the Web Editor: 1. Select **Delete**. 1. In **Commit message**, enter a reason for the commit. 1. Choose between the following options: - - To Delete a file from the prefilled target branch, select **Commit changes**. + - To delete a file from the prefilled target branch, select **Commit changes**. - To delete a file from a new branch and commit changes: 1. Select **Commit to a new branch**. 1. Enter a branch name. -- GitLab