From f9a4c78a28f121ff0568ab97db5293f30cb57523 Mon Sep 17 00:00:00 2001 From: Leyland Yang <105257885+yangleyland@users.noreply.github.com> Date: Wed, 17 Dec 2025 16:21:43 -0800 Subject: [PATCH] Update guides/branches.mdx Co-Authored-By: mintlify-development[bot] <109878554+mintlify-development[bot]@users.noreply.github.com> --- guides/branches.mdx | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/guides/branches.mdx b/guides/branches.mdx index 3bb82ef9a..706d6565c 100644 --- a/guides/branches.mdx +++ b/guides/branches.mdx @@ -123,3 +123,31 @@ Use clear, descriptive names that explain the purpose of a branch. ## Merge branches Once your changes are ready to publish, create a pull request to merge your branch into the deployment branch. + +## Delete a branch + +After merging a branch, you can delete it to keep your repository organized. + + + + After your pull request is merged, the web editor displays a notification that the branch has been merged. Click **Delete branch** to remove the branch from your repository. + + + You cannot delete the deploy branch or the repository's default branch (usually `main`). + + + + + Delete a branch locally and remotely: + + ```bash + # Delete the local branch + git branch -d branch-name + + # Delete the remote branch + git push origin --delete branch-name + ``` + + Use `-D` instead of `-d` to force delete a branch that hasn't been merged. + +