Git Cheat Sheet/Set pull to rebase by default

Avoid merge commits on pull.

Section: Setup and Configuration

Set pull to rebase by default

bash
bash
git config --global pull.rebase true

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Setup and Configuration
Set global user name
Set default author name.
OpenIn sheetbashsame section
Set global email
Set default author email.
OpenIn sheetbashsame section
Set default editor
Choose editor for commit messages and interactive rebase.
OpenIn sheetbashsame section
Set default branch name
Use main for new repositories.
OpenIn sheetbashsame section
Enable rerere
Reuse recorded resolution for repeated conflicts.
OpenIn sheetbashsame section
Create status alias
Add a short alias.
OpenIn sheetbashsame section