Skip to content

Commit 01e3564

Browse files
committed
update conceptual info about branches
1 parent 1403d9a commit 01e3564

File tree

1 file changed

+20
-52
lines changed

1 file changed

+20
-52
lines changed

editor/branches.mdx

Lines changed: 20 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,56 @@
11
---
22
title: "Working with branches"
3-
description: "Use branches to safely make changes without affecting your live documentation"
3+
description: "Use branches to make and review changes without affecting your live documentation"
44
---
55

6-
Branches let you work on changes without affecting your live documentation site. When your changes are ready, you can merge them into your deployment branch through a pull request.
6+
Branches are a version control feature that let you create separate instances of your documentation, then merge into your main branch if you want to publish your changes. Think of a branch as a copy of your documentation where you can experiment, make edits, and test changes before they go live.
77

8-
## Why use branches
8+
A benefit of branches is that your team can work simultaneously on seprate branches without getting in each other's way. Even if two different branches make changes to the same file, you will be required to resolve any conflicts before merging branches and publishing your docs updates.
99

10-
**Best practice: Always work from branches.** This approach:
10+
If you decide that you don't want to publish changes from a branch, you can delete the branch with no consequences. This makes branch a safe place to experiment and try new approaches to your content.
1111

12-
- Keeps your live documentation stable while you make changes
13-
- Enables proper review workflows with your team
14-
- Creates a clear history of what changed and when
15-
- Allows you to experiment safely with new content or structure
16-
17-
Even if you're working solo, branches are valuable for previewing changes before they go live.
12+
We recommend that you always work from branches when you're updating your documentation. This ensures that your live site stays stable and enables review workflows for any updates.
1813

1914
## Creating a branch
2015

2116
<Steps>
2217
<Step title="Open the branch selector">
23-
Select the branch name in the editor toolbar (usually `main` by default).
18+
Select the branch name in the editor toolbar (usually `main`).
2419
</Step>
2520
<Step title="Create new branch">
2621
Select **New Branch** from the dropdown menu.
2722
</Step>
2823
<Step title="Name your branch">
29-
Enter a descriptive name like:
24+
Use a descriptive name that explains what you're working on:
3025
- `update-getting-started`
31-
- `fix-installation-steps`
32-
- `add-api-examples`
26+
- `fix-api-examples`
27+
- `restructure-navigation`
3328
</Step>
3429
<Step title="Create and switch">
35-
Select **Create Branch**. The editor will switch to your new branch automatically.
30+
Select **Create Branch**. The editor switches to your new branch automatically.
3631
</Step>
3732
</Steps>
3833

3934
<Note>
40-
If the editor doesn't automatically switch to your new branch, select it manually from the branch dropdown.
35+
If the editor doesn't switch automatically, select your new branch from the dropdown menu.
4136
</Note>
4237

43-
## Saving changes on a branch
44-
45-
When you're working on a branch:
46-
47-
1. Make your edits in visual mode or Markdown mode
48-
2. Select the **Save Changes** button in the top-right corner
49-
3. This creates a commit with your changes and pushes it to your branch
38+
## Saving and switching
5039

51-
Your changes are now saved but not yet live on your documentation site.
40+
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.
5241

53-
## Switching between branches
54-
55-
<Steps>
56-
<Step title="Open branch selector">
57-
Select the current branch name in the editor toolbar.
58-
</Step>
59-
<Step title="Choose target branch">
60-
Select the branch you want to switch to from the dropdown menu.
61-
</Step>
62-
</Steps>
42+
To switch branches, select the current branch name in the toolbar and choose a different branch from the dropdown.
6343

6444
<Tip>
65-
Any unsaved changes will be lost when switching branches. Make sure to save your work first by selecting **Save Changes**.
45+
Unsaved changes are lost when switching branches. Save your work first.
6646
</Tip>
6747

68-
## Branch types
69-
70-
### Deployment branch
71-
Your main branch (often called `main`) contains your live documentation content. Changes to this branch are automatically published to your documentation site immediately.
48+
## Understanding branch types
7249

73-
### Feature branches
74-
Any branch other than your deployment branch. Use these for:
75-
- New feature documentation
76-
- Content updates and revisions
77-
- Experimental changes
78-
- Collaborative work that needs review
50+
**Deployment branch**: Your main branch (usually `main`) contains your live documentation. Changes here publish immediately to your site.
7951

80-
Changes on feature branches require a pull request to merge into your deployment branch.
52+
**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.
8153

82-
## Best practices
54+
## Working with your team
8355

84-
- **Use descriptive branch names** that explain what you're working on
85-
- **Keep branches focused** on a single task or feature
86-
- **Save frequently** to avoid losing work when switching branches
87-
- **Delete branches** after merging to keep your repository clean
88-
- **Communicate with your team** about which branches are active
56+
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.

0 commit comments

Comments
 (0)