You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/testing-deployment-publishing/branching-collaboration/branching.md
+45-39Lines changed: 45 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -184,9 +184,9 @@ During a merge, FlutterFlow compares the changes made in both branches, if the c
184
184
185
185
:::
186
186
187
-
### Initiating a merge
187
+
### Initiating a Merge
188
188
189
-
FlutterFlow currently supports **two merging approaches**: the existing “**Merge**” functionality and the new “**Git Merge**” (v2). Below is a comprehensive overview of both approaches and detailed guidance on the recommended workflow.
189
+
FlutterFlow currently supports **two merging approaches**: the existing “**Merge**” functionality and the new “**Git Merge**” (v2).
190
190
191
191
-[**Merge (Legacy)**](#): The legacy merge uses a custom tool (originally built in FlutterFlow) to calculate differences and conflicts between branches.
192
192
-[**Git Merge (New)**](#): The new Git Merge option leverages Git's robust repository and conflict-resolution capabilities.
@@ -195,13 +195,13 @@ FlutterFlow currently supports **two merging approaches**: the existing “**Mer
195
195
196
196
At present, both methods are available side by side, allowing you to either continue using the legacy merge or adopt Git Merge. Over time, as Git Merge proves its stability, the legacy merge may be deprecated.
197
197
198
-
The Merge (Legacy) option has some known issues with merges being incorrectly calculated. Therefore, **we strongly recommend using [Git Merge](#) whenever possible for a smoother and more accurate merge process.**
198
+
The Merge (Legacy) option has some known issues with merges being incorrectly calculated. Therefore, **we strongly recommend using [Git Merge](#git-merge-new) whenever possible for a smoother and more accurate merge process.**
199
199
200
200
:::
201
201
202
202
#### Merge (Legacy)
203
203
204
-
You can initiate a merge in either direction—merging from a parent branch into a child branch or from a child branch back into the parent branch—by selecting the Branch Options button next to the current branch in the Branching Menu.
204
+
You can initiate a merge in either direction—merging from a parent branch into a child branch or from a child branch back into the parent branch—by selecting the **Branch** Options button next to the current branch in the Branching Menu.
205
205
206
206
<div style={{
207
207
position: 'relative',
@@ -237,7 +237,7 @@ Next, you'll see a screen that will display if there are any conflicts. If you d
237
237
238
238
#### Git Merge (New)
239
239
240
-
The new Git Merge option uses Git under the hood to calculate differences between project files. Each project is backed by a repository of YAML files (except for custom code, which appears as Dart files). These YAML files map directly to various project properties, and Git calculates differences among these files to identify merge conflicts. This method provides clearer and more consistent conflict detection compared to [legacy Merge](https://www.notion.so/Merge-V2-16fc6675fc3180bb9ad5c7ac2e3dbd06?pvs=21) (a custom solution).
240
+
The new Git Merge option uses Git under the hood to calculate differences between project files. Each project is backed by a repository of YAML files (except for custom code, which appears as Dart files). These YAML files map directly to various project properties, and Git calculates differences among these files to identify merge conflicts. This method provides clearer and more consistent conflict detection compared to [legacy Merge](#merge-legacy) (a custom solution).
241
241
242
242
:::info
243
243
@@ -261,47 +261,41 @@ When performing a Git merge in FlutterFlow, you’ll see a screen with multiple
261
261
**Top Panel**
262
262
263
263
-**Branch Information**: At the top of the merge interface, you’ll see exactly which branches are being merged. You have two options for merging directions:
264
-
-**Parent → Child**: Pulls changes down from the parent into the child branch, often used to keep a feature branch in sync with upstream updates.
265
-
-**Child → Parent**: Pushes features (or other changes) from the child branch back up to the parent, commonly done once a feature is ready for the main codebase.
266
-
-**YAML Validation Errors**: Occurs when manual edits to the YAML files produce invalid syntax. Clicking on these errors should redirect you to the specific file, and invalid lines will be underlined in red within the file. Note that, you **cannot** complete the merge while YAML errors exist.
264
+
-**Parent → Child**: Pulls changes down from the parent into the child branch, often used to keep a feature branch in sync with the parent branch.
265
+
-**Child → Parent**: Pushes features (or other changes) from the child branch back up to the parent, commonly done once a feature is ready to go into parent branch.
266
+
-**YAML Validation Errors**: Occurs when manual edits to the YAML files produce invalid syntax. Clicking on these errors should redirect you to the specific file. Invalid lines will be underlined in red within the file and, you **cannot** complete the merge while YAML errors exist.
267
267
-**Project Errors**: Project errors occur when the result of a merge creates a problem in your project. For example, this might happen if the merge results in two data types having the same name. These errors need to be resolved to ensure your project works as expected. You have several options to deal with project errors:
268
-
-**Fix the Errors During the Merge**: This approach ensures that the merged project is error-free right from the start. Here’s how you can do it:
268
+
-**Fix Errors During the Merge**: This approach ensures that the merged project is error-free right from the start. Here’s how you can do it:
269
269
- **Edit the YAML files:** Update the YAML files to fix issues, such as renaming a data type that causes a conflict.
270
-
- **Edit the project directly while merging:** While still in the merge process, open the project, make the necessary changes (like renaming the conflicting data type), and then continue.
271
-
-**Fix the Errors After the Merge**: If you prefer, you can complete the merge first and address the errors later. For example, finish the merge process as it is. After merging, go back to the project and resolve any issues.
270
+
- **Edit the Project Directly while Merging:** While still in the merge process, open the project, make the necessary changes (like renaming the conflicting data type), and then continue.
271
+
-**Fix Errors After the Merge**: If you prefer, you can complete the merge first and address the errors later. For example, finish the merge process as it is. After merging, go back to the project and resolve any issues.
272
272
-**Cancel**: Abandons the merge process and discards any conflict resolutions you’ve already applied during this merge session.
273
273
-**Merge**: Finalizes the merge once all merge conflicts and YAML validation errors are cleared. Project errors can remain if you choose to resolve them later.
274
274
-**Bulk Accept Changes**: Accessible via the arrow next to “Merge,” this option lets you accept all changes from one branch at once—handy if you already know which branch’s changes take precedence.
275
275
276
-
**Left-Hand Side Panel: Project Configuration YAML Files**
276
+
**Left-Hand Side Panel**
277
277
278
278
The left-hand side panel displays all the project configuration YAML files, which are crucial for managing your project’s settings and structure.
279
279
280
-
YAML (Yet Another Markup Language) files use a simple, human-readable format to define configuration data. They are [particularly useful](https://www.notion.so/Merge-V2-16fc6675fc3180bb9ad5c7ac2e3dbd06?pvs=21) during a merge because they allow you to directly review, understand, and resolve any changes or conflicts in your project’s configuration.
280
+
YAML (Yet Another Markup Language) files use a simple, human-readable format to define configuration data. They are particularly useful during a merge because they allow you to directly review, understand, and resolve any changes or conflicts in your project’s configuration.
281
281
282
282
-**Filter Files:** You can use filters to narrow down the list of YAML files based on specific criteria:
283
+
283
284
-**All Files:** Shows every YAML file in the project.
284
285
-**Files with Changes:** Displays only files where a change has been made on either branch.
285
286
-**Files with Conflicts:** Shows only files that have merge conflicts, where the changes in one branch directly contradict the changes in the other.
286
287
287
-
288
-
:::tip
289
-
- A **change** refers to any update, addition, or deletion made to a YAML file on one of the branches. For example, modifying a field name or changing the properties of a widget.
290
-
- A **conflict** occurs when the same part of a file has been changed in both branches, making it unclear which version to keep. For instance, if one branch changes the color of the Container to blue and the other changes it to red, this creates a conflict.
291
-
292
-
:::
293
-
294
-
-**Search for a Specific File:** If you’re looking for a particular YAML file, you can use the search bar to locate it quickly. This is especially useful in larger projects with many configuration files.
295
-
296
-
:::info
288
+
:::info
289
+
- A **change** refers to any update, addition, or deletion made in one of the branches. For example, modifying a field name or changing the properties of a widget.
290
+
- A **conflict** occurs when the same part of a file has been changed in both branches, making it unclear which version to keep. For instance, if one branch changes the color of the Container to blue and the other changes it to red, this creates a conflict.
291
+
:::
297
292
298
-
- Some YAML file names may include a **key**, which serves as a unique identifier.
299
-
- Clicking on a YAML file in the panel opens it in the editor, allowing you to view, edit, and resolve issues directly.
293
+
-**Search File:** If you’re looking for a particular file, you can use the search bar to locate it quickly. This is especially useful in larger projects with many configuration files.
300
294
301
-
:::
295
+
Clicking on a file in the panel opens it in the editor, allowing you to view, edit, and resolve issues directly.
302
296
303
297
304
-
**Lower Panel: The Merge Result**
298
+
**Lower Panel**
305
299
306
300
The **Lower Panel** displays the final merged files after Git applies its merging logic. It gives you a chance to manually inspect and edit the outcome—whether or not a conflict occurs.
307
301
@@ -313,18 +307,18 @@ Git attempts to combine changes from both branches automatically. If Git can’t
313
307
314
308
:::info
315
309
316
-
Git may label branches as `HEAD` or a commit reference, which can differ from the friendly branch names shown in FlutterFlow.
310
+
Git may label branches as `HEAD` or a commit reference, which can differ from the friendly branch names you given.
317
311
318
312
-**HEAD**: Refers to the current branch (or commit) you’re on—essentially your “main viewpoint” in Git.
319
-
-**Other Branch**: Denotes the second branch (or commit) you’re merging in, which might be labeled using a commit hash or the branch name from the repository.
313
+
-**Other Branch**: Denotes the second branch (or commit) you’re merging in, which might be labeled using a commit hash.
320
314
321
315
:::
322
316
323
317
You can modify files in the lower panel at any time—even if there’s no conflict. You could also choose which branch’s changes to keep here. You might decide to keep certain lines from `HEAD` (your current branch) or from the other branch or combine them manually.
324
318
325
-
After editing, click Save to confirm your changes. A red Reset button appears if you want to undo your edits and restore the file to its initial merged state before you began editing.
319
+
After editing, click **Save** to confirm your changes. A red reset button appears if you want to undo your edits and restore the file to its initial state before you began editing.
326
320
327
-
### Resolve merge conflicts
321
+
### Resolve Merge Conflicts
328
322
A merge conflict occurs when multiple team members make changes to the same part of the project.
329
323
330
324
For example, imagine two developers, Alice and Bob, are working on the same FlutterFlow project and both decide to update the same button widget.
@@ -380,19 +374,17 @@ You can review each file with merge conflicts and choose to:
380
374
381
375
- Accept all changes from one branch.
382
376
- Pick specific changes from each branch.
383
-
- Manually edit the merged YAML files.
384
-
385
-
After conflict resolution, it’s essential to correct any YAML validation errors that arise from manual edits.
386
-
387
-
Finally, complete the merge by clicking “Merge.” If you merged a child branch into its parent and are confident everything looks correct, you may delete the child branch.
377
+
- Manually edit the YAML files. **Note that** it’s essential to correct any YAML validation errors that arise from manual edits.
388
378
379
+
Finally, complete the merge by clicking **Merge**.
389
380
:::tip
390
-
Should you discover a mistake in your merge, you can revert your branch to a prior commit, though any work done since that commit will be lost.
381
+
- If you merged a child branch into its parent and are confident everything looks correct, you may delete the child branch.
382
+
- If you find any issues after the merge, you can revert the branch to an earlier commit. However, be aware that any changes made after that commit will be lost.
391
383
:::
392
384
393
385
[Arcade]
394
386
395
-
### Resolve conflicts manually
387
+
### Resolve Conflicts Manually
396
388
If you choose to resolve manually, you can directly make changes in the **Accepted Changes** section. Note that if you cancel a manual resolution, you can choose to either keep or discard the changes you have made since starting the manual resolution.
397
389
398
390
<div style={{
@@ -486,4 +478,18 @@ Here’s how you can close a branch:
486
478
487
479
-**Review before deletion:** Before closing a branch, ensure that all necessary changes have been merged or no longer need to be kept.
488
480
-**Coordinate with your team:** If you’re working in a team, ensure that no one is actively using the branch before you close it, to avoid disrupting ongoing work.
489
-
:::
481
+
:::
482
+
483
+
## FAQs
484
+
<details>
485
+
<summary>
486
+
How YAML files are helpful during a merge?
487
+
</summary>
488
+
<p>
489
+
YAML files play a key role in managing and resolving conflicts during the merge process because:
490
+
- YAML files hold important configuration data, such as settings, resource definitions, and project properties. During a merge, changes in these files reflect modifications to the structure or behavior of the project.
491
+
- The simple and hierarchical nature of YAML makes it easy to spot changes or conflicts, even in complex files.
492
+
- YAML files allow you to manually edit and resolve conflicts during the merge process.
493
+
- Since YAML files are text-based, they are version-controlled effectively, enabling multiple team members to make changes and merge their work.
0 commit comments