Skip to content

    Merge

    Reading time: 2 min.Editorially reviewed on:

    Definition

    A merge combines changes from different development lines into a common version.

    In Git, a merge integrates changes from another branch into the current branch. Depending on the history, this can create a merge commit or advance a branch pointer. If changes cannot be reconciled automatically, conflicts must be resolved before completion.

    Simply explained

    You combine two edited versions and decide how the joint version should look in case of conflicts.

    Why it matters in practice

    Merges enable parallel development while allowing changes to flow back into a shared codebase afterwards.

    Example from business

    Possible example: A team merges the branch of a new form feature into the main branch and then tests the result.

    Limits and pitfalls

    • A conflict-free merge does not guarantee a functionally correct combination. Independently changed program parts can still cause undesired behavior together.

    Origin & history

    Git models development as a history of commits; merge connects diverging development paths according to chosen rules.

    Use in mid-sized companies

    • Teams can adopt completed changes in a controlled manner while documenting test results and intended integration.

    Frequently asked questions

    Does every merge create a new commit?

    No. In a possible fast-forward, the branch pointer can be advanced without an additional merge commit.

    Sources

    Editorially reviewed on:

    On this page

    Next step

    Put knowledge into practice