Skip to content

Commit 2bf4831

Browse files
committed
docs: add branching documentation
- Add new pages for "Branching" and "Merging Branches" - Include branching visuals and examples for key workflows - Update sidebar navigation to include "Branching" section
1 parent 5e1a868 commit 2bf4831

12 files changed

+187
-0
lines changed
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
id: merging_branches
3+
title: Merging Branches
4+
image: /img/og-images/platform.png
5+
---
6+
7+
import { ScreenshotWrapper } from '../shared/_ScreenshotWrapper';
8+
9+
Merging applies the changes from one branch (the **source**) into another branch (the **target**). Before the merge is applied, Tolgee analyses the differences and shows you a preview so you can review everything — and resolve any conflicts — before committing.
10+
11+
## Initiating a Merge
12+
13+
Go to **Branching** in the project sidebar. Click the **branch icon button** next to the branch you want to merge. Tolgee immediately opens the merge preview page.
14+
15+
:::info
16+
The merge always goes into the **default branch** (`main`). To merge into a different target, contact your administrator or restructure your branching workflow.
17+
:::
18+
19+
## Understanding the Merge Preview
20+
21+
The merge preview shows a summary of all differences between the source and target branch, grouped into four categories:
22+
23+
<ScreenshotWrapper
24+
src="/img/docs/platform/branching/screenshot_07_merge_preview_overview.png"
25+
alt="Merge preview showing change summary and conflict panel"
26+
/>
27+
28+
| Category | Meaning |
29+
|----------|---------|
30+
| **Added** | Keys that exist in the source branch but not in the target — they will be created |
31+
| **Modified** | Keys that were changed in the source branch — the target version will be updated |
32+
| **Deleted** | Keys that were removed in the source branch — they will be deleted from the target |
33+
| **Conflicts** | Keys that were changed in *both* branches — you must choose which version to keep |
34+
35+
The tabs below the summary let you browse each category. Non-conflicting changes (Added, Modified, Deleted) are applied automatically.
36+
37+
### Reviewing Modified Changes
38+
39+
The **Modified** tab shows a three-column view: source branch on the left, merge preview in the centre, and the target branch on the right.
40+
41+
<ScreenshotWrapper
42+
src="/img/docs/platform/branching/screenshot_08_merge_modified_tab.png"
43+
alt="Modified tab showing three-column comparison view"
44+
/>
45+
46+
These changes require no action — they will be applied automatically when you complete the merge.
47+
48+
## Resolving Conflicts
49+
50+
A conflict occurs when the same key was changed in both branches since the branch was created. You must choose which version to keep before the merge can be completed.
51+
52+
<ScreenshotWrapper
53+
src="/img/docs/platform/branching/screenshot_09_merge_conflict_panel.png"
54+
alt="Conflict panel showing source and target versions side by side"
55+
/>
56+
57+
For each conflict, you see:
58+
- The **source branch** version on the left
59+
- The **merge preview** (empty until resolved) in the centre
60+
- The **target branch** version on the right
61+
62+
Click **Accept** on either side to choose that version. The merge preview in the centre updates to reflect your choice and the conflict is marked as resolved.
63+
64+
You can expand **All Translations** to see all languages for a key before deciding.
65+
66+
:::info
67+
Tags, labels, and screenshots are always **combined** from both branches — they are never lost in a merge.
68+
:::
69+
70+
## Completing the Merge
71+
72+
Once all conflicts are resolved, the **Complete the merge** button becomes active and the conflicts counter shows all resolved.
73+
74+
<ScreenshotWrapper
75+
src="/img/docs/platform/branching/screenshot_10_merge_ready_to_complete.png"
76+
alt="Merge ready to complete with all conflicts resolved"
77+
/>
78+
79+
Optionally check **Delete [branch name] after merge** to automatically remove the source branch once the merge is applied.
80+
81+
Click **Complete the merge** to apply all changes to the target branch.
82+
83+
## Merge Invalidation
84+
85+
If the source or target branch is modified while the merge preview is open (for example, someone edits a translation in the meantime), the merge preview becomes stale. Tolgee will notify you and offer a **Refresh** option to re-analyse the differences with the latest state of both branches.
86+
87+
Any conflict resolutions you already made are preserved where possible after a refresh.

platform/branching/overview.mdx

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
id: overview
3+
title: Branching
4+
image: /img/og-images/platform.png
5+
---
6+
7+
import { ScreenshotWrapper } from '../shared/_ScreenshotWrapper';
8+
9+
:::info Feature availability
10+
Branching is available on Business and Enterprise plans. [Upgrade your plan](https://tolgee.io/pricing) to use this feature.
11+
12+
If you use the self-hosted version, you must [set up the license](/platform/self_hosting/licensing) to use this feature.
13+
:::
14+
15+
Branching lets you create isolated copies of your project's translations to work on independently. Different teams can work on separate branches simultaneously without affecting each other, then merge changes back when ready.
16+
17+
**Common use cases:**
18+
- Translating a new feature without affecting the production translations
19+
- Preparing translations for an upcoming release while regular translation work continues
20+
- Experimenting with copy changes before committing them to the main branch
21+
22+
## Key Concepts
23+
24+
- **Branch** — an isolated copy of all translation keys and their translations at the point of branching
25+
- **Default branch** (`main`) — the primary branch every project starts with; it always exists and cannot be deleted
26+
- **Protected branch** — a read-only branch; translations can only be changed via a merge, not edited directly
27+
- **Merge** — the process of applying changes from one branch into another, with conflict detection and resolution
28+
29+
## Navigating Between Branches
30+
31+
The **branch selector** in the breadcrumb bar lets you switch between branches. All views that work with translations — dashboard, translations, import, export, and tasks — reflect the currently selected branch.
32+
33+
<ScreenshotWrapper
34+
src="/img/docs/platform/branching/screenshot_01_translations_with_branch_selector.png"
35+
alt="Translations view with branch selector in the breadcrumb"
36+
/>
37+
38+
Click the branch selector to open the list of available branches and switch to a different one.
39+
40+
<ScreenshotWrapper
41+
src="/img/docs/platform/branching/screenshot_02_branch_selector_open.png"
42+
alt="Branch selector open showing all branches"
43+
/>
44+
45+
## Managing Branches
46+
47+
Go to **Branching** in the project sidebar to manage all branches for the project.
48+
49+
<ScreenshotWrapper
50+
src="/img/docs/platform/branching/screenshot_03_branches_list.png"
51+
alt="Branches list with multiple branches"
52+
/>
53+
54+
### Creating a Branch
55+
56+
Click **+ Branch** to open the create dialog. Give the branch a name and optionally choose a source branch to branch from (defaults to the default branch).
57+
58+
<ScreenshotWrapper
59+
src="/img/docs/platform/branching/screenshot_04_create_branch_dialog.png"
60+
alt="Create new branch dialog"
61+
/>
62+
63+
Branch names can contain letters, numbers, slashes, hyphens, and underscores. Slashes are commonly used to group branches by purpose, e.g. `feature/new-onboarding`.
64+
65+
### Branch Actions
66+
67+
Each branch has a **** menu with the following actions:
68+
69+
<ScreenshotWrapper
70+
src="/img/docs/platform/branching/screenshot_05_branch_actions_menu.png"
71+
alt="Branch actions menu showing Rename, Protect, and Delete"
72+
/>
73+
74+
- **Rename** — change the branch name
75+
- **Protect / Unprotect** — toggle the protected state. A protected branch is read-only; translations must be merged in, not edited directly. Useful for guarding stable branches.
76+
- **Delete** — permanently remove the branch and all its translations
77+
78+
:::caution
79+
Deleting a branch is permanent. All translations that exist only in that branch will be lost.
80+
:::
81+
82+
### Merge Button
83+
84+
The branch icon button (next to the ⋮ menu) starts a merge from that branch into the default branch. See [Merging Branches](merging_branches) for the full merge workflow.
85+
86+
## Permissions
87+
88+
| Action | Required permission |
89+
|--------|-------------------|
90+
| View branches and switch between them | Any project member |
91+
| Create, rename, delete, protect branches | Branch management |
92+
| Merge branches | Any project member |

sidebarPlatform.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ module.exports = {
1919
'projects_and_organizations/machine-translation-settings',
2020
'projects_and_organizations/ai-settings',
2121
'projects_and_organizations/tasks',
22+
{
23+
label: 'Branching',
24+
type: 'category',
25+
items: [
26+
'branching/overview',
27+
'branching/merging_branches',
28+
],
29+
},
2230
'projects_and_organizations/order_translation',
2331
'projects_and_organizations/members',
2432
'projects_and_organizations/import',
94.4 KB
Loading
104 KB
Loading
43.5 KB
Loading
44.6 KB
Loading
44.9 KB
Loading
87.2 KB
Loading
76.5 KB
Loading

0 commit comments

Comments
 (0)