Gitflow
⤵️Stop Pull from Making Merge CommitsEasy+300 XP
Workshop
Scenario reference

Stop Pull from Making Merge Commits: the situation, step by step

The situation

Every `git pull` is creating ugly 'Merge branch main of origin/main' commits. The team standard is rebase-on-pull.

Set pull.rebase=true in config, or use --rebase per-pull.

Easy · 2 steps · +300 XP

What you will practice

This scenario walks through 2 steps, in order:

  1. 01Configure pull to rebase by default
  2. 02Pull with rebase explicitly
Reveal the step-by-step commands

Try the terminal first — you learn more by doing. When you want to check yourself, here is the command for each step.

  1. 1. Configure pull to rebase by default
    git config --global pull.rebase true
  2. 2. Pull with rebase explicitly
    git pull --rebase origin main

Key takeaway

`git config --global pull.rebase true` once, never see merge bubbles again.