Skip to content

How to merge without breaking

Merge small and often, resolve conflicts immediately, write a real merge message, and use --no-ff when you want an audit trail.

Merging without pain

  1. Merge small branches

    A 20-commit branch conflicts more than a 2-commit branch. Merge daily, not monthly.

  2. Resolve conflicts locally

    Read every conflict mark; do not blindly accept "theirs". A wrong conflict resolution is a silent bug.

  3. Use `--no-ff` for feature branches

    A merge commit records the merge in history. git merge --no-ff feature/x makes it visible.

  4. Write the merge message

    Default is "Merge branch 'x' into 'y'". If the branch has 20 commits, list them in the body. Future-you will thank you.