Skip to content

Commit 9223ba6

Browse files
committed
more concision
1 parent 1d0bd7c commit 9223ba6

File tree

1 file changed

+20
-36
lines changed

1 file changed

+20
-36
lines changed

editor/branches.mdx

Lines changed: 20 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,50 +3,34 @@ title: "Working with branches"
33
description: "Use branches to make and review changes without affecting your live documentation"
44
---
55

6+
Branches are a feature of version control that point to specific commits in your repository. Your deployment branch, usually called `main`, represents the content that is used to build your live documentation. All other branches are independent of your live docs unless you choose to merge them into your deployment branhc.
7+
68
Branches let you create separate instances of your documentation to make changes, get reviews, and try new approaches before publishing. Your team can work on branches to update different parts of your documentation at the same time without affecting what users see on your live site until you publish any changes.
79

810
We recommend always working from branches when updating documentation to keep your live site stable and enable review workflows.
911

10-
## Creating a branch
11-
12-
<Steps>
13-
<Step title="Open the branch selector">
14-
Select the branch name in the editor toolbar (usually `main`).
15-
</Step>
16-
<Step title="Create new branch">
17-
Select **New Branch** from the dropdown menu.
18-
</Step>
19-
<Step title="Name your branch">
20-
Use a descriptive name that explains what you're working on:
21-
- `update-getting-started`
22-
- `fix-api-examples`
23-
- `restructure-navigation`
24-
</Step>
25-
<Step title="Create and switch">
26-
Select **Create Branch**. The editor switches to your new branch automatically.
27-
</Step>
28-
</Steps>
29-
30-
<Note>
31-
If the editor doesn't switch automatically, select your new branch from the dropdown menu.
32-
</Note>
33-
34-
## Saving and switching
35-
36-
Save changes to your branch by selecting **Save Changes** in the top-right corner. This creates a commit and pushes your work to the branch.
37-
38-
To switch branches, select the current branch name in the toolbar and choose a different branch from the dropdown.
39-
4012
<Tip>
41-
Unsaved changes are lost when switching branches. Save your work first.
13+
- Name branches clearly so teammates understand what you're working on.
14+
- Delete branches after merging to keep your repository organized.
15+
- Let your team know when you're working on major changes that might affect their work.
4216
</Tip>
4317

44-
## Understanding branch types
18+
## Creating a branch
4519

46-
**Deployment branch**: Your main branch (usually `main`) contains your live documentation. Changes here publish immediately to your site.
20+
1. Select the branch name in the editor toolbar (usually `main` by default).
21+
2. Select **New Branch**.
22+
3. Enter a descriptive name for your branch like `update-getting-started` or `fix-api-examples`.
23+
4. Select **Create Branch**.
4724

48-
**Feature branches**: All other branches where you work on changes before they're ready to go live. These require a pull request to merge into your main branch.
25+
## Saving changes on a branch
4926

50-
## Working with your team
27+
To save your changes on a branch, select the **Save Changes** button in the top-right corner of the editor. This creates a commit and pushes your work to your branch.
5128

52-
Name branches clearly so teammates understand what you're working on. Delete branches after merging to keep your repository organized. Let your team know when you're working on major changes that might affect their work.
29+
## Switching branches
30+
31+
1. Select the branch name in the editor toolbar.
32+
2. Select the branch you want to switch to from the dropdown menu.
33+
34+
<Tip>
35+
Unsaved changes are lost when switching branches. Make sure to save or publish your work before switching branches.
36+
</Tip>

0 commit comments

Comments
 (0)