-
Notifications
You must be signed in to change notification settings - Fork 109
Add FAQ for Merging Behavior #344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
10fdd49
Add FAQ for merging behavior
pinkeshmars 214b415
Address review comments
pinkeshmars a55e1f9
Merge branch 'main' into fix/faq-merge-info
pinkeshmars cd13923
Merge branch 'main' into fix/faq-merge-info
pinkeshmars aeee9ef
Update info + add diagram
pinkeshmars 15623fb
Merge branch 'fix/faq-merge-info' of https://github.com/FlutterFlow/f…
pinkeshmars ef6085f
Address review comments
pinkeshmars 2883aac
Merge branch 'main' into fix/faq-merge-info
pinkeshmars File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -515,4 +515,33 @@ YAML files play a key role in managing and resolving conflicts during the merge | |
- YAML files allow you to manually edit and resolve conflicts during the merge process. | ||
- Since YAML files are text-based, they are version-controlled effectively, enabling multiple team members to make changes and merge their work. | ||
</p> | ||
</details> | ||
</details> | ||
|
||
<details> | ||
<summary> | ||
Why didn’t all my changes appear after merging two branches? | ||
</summary> | ||
<p> | ||
In merging, Git copies only the differences (diffs) between branches, not the full content from one branch to another. This behavior often leads to confusion, especially if users expect merging to act like a full copy-paste of all data. | ||
</p> | ||
<p> | ||
Here are a few important things to know: | ||
</p> | ||
<ul> | ||
<li><strong>Merging propagates changes (diffs)</strong>: it does not transfer every element from one branch to another.</li> | ||
<li><strong>No conflicts ≠ no changes</strong>: “No conflicts” doesn’t mean “no changes” and it definitely doesn’t mean the project is error-free.</li> | ||
<li><strong>Project errors are not bugs</strong>: Project errors let you know that you are making mistakes when merging data. Even if changes are successfully merged, project errors indicate areas you should double-check to ensure everything merged as expected.</li> | ||
<li>If a change was previously accepted or rejected during a merge, it won’t appear as a diff the next time you merge the same branches. That’s expected behavior.</li> | ||
</ul> | ||
<p> | ||
|
||
For example, you merge `Branch B` into `Branch A`, and `change C` gets copied over. Later, you decide to undo `change C` directly on `Branch A`. Now, if you merge `Branch B` into `Branch A` again, Git will not re-flag `change C` as a difference. This is because Git considers it already merged and no longer a diff. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. specify that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done! |
||
|
||
</p> | ||
<p> | ||
|
||
<strong>Best Practice:</strong> Keep your branch histories short and simple. After each merge, delete the merged branch to avoid unnecessary complexity. For example, if you merge `Branch B` into `Branch A`, and later want to undo or revise those changes, don’t go back and modify `Branch B`. Instead, create a new branch (e.g., `Branch C`) from `Branch A` to make your updates. | ||
|
||
This approach prevents intertwining branch histories, avoids confusing merge behavior, and ensures clean, trackable diffs. Keeping branches focused and temporary makes merging more predictable and manageable. | ||
</p> | ||
</details> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This phrasing is misleading -- I think it would be useful to include a diagram to show a full picture of what actually happens.
When a merge (A -> B) occurs, we compare:
Both of those diffs are then applied to the common ancestor. Conflicts arise if the diffs conflict with each other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 diagram may be needed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@victoriahuang1 updated the info as mentioned and added a diagram. Let me know if it looks good to you now!