Skip to content

Merging Clarification #433

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Merging Clarification #433

wants to merge 1 commit into from

Conversation

pinkeshmars
Copy link
Collaborator

Description

Merging Clarification

Linear ticket and magic word Fixes DEVR-1004

Type of change

  • Typo fix
  • New feature
  • Enhancement to current docs
  • Removed outdated references
  • Update assets

Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

:::note
It’s important to understand what merging actually means. Merging does not perform a "union" of data between branches. Instead, Git merge reconciles differences (diffs) between the branches. When you merge, Git compares the changes made in the new branch with the main branch and applies these changes directly.

Some users mistakenly assume merging works like combining data from both branches. For example, if you create a new branch, delete all existing data, and then add new data to that branch, Git will interpret these actions as deleting the original data and replacing it entirely with new content. If you merge this branch back into the main branch, Git will apply these deletions as well, effectively deleting all the project's previous data. Learn more about [**Merging**](#merging).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's rephrase this -- should not make it sound like we're blaming the users

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Some users mistakenly assume merging works like combining data from both branches. For example, if you create a new branch, delete all existing data, and then add new data to that branch, Git will interpret these actions as deleting the original data and replacing it entirely with new content. If you merge this branch back into the main branch, Git will apply these deletions as well, effectively deleting all the project's previous data. Learn more about [**Merging**](#merging).
For instance, if a branch is created and all existing data is deleted before new content is added, Git interprets this as a replacement. When the branch is merged back into the main branch, those deletions will also be applied removing the original data. This behaviour can be surprising to those expecting Git to automatically preserve all content from both branches. Learn more about [**Merging**](#merging).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this sound better?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants