Skip to content

.tip

· one of the small things

rebase.autostash saves the stash dance

A rebase or a pull won't run on a dirty tree, so you stash, run it, pop, and one time in ten you forget the pop.

git config --global rebase.autostash true
git config --global pull.rebase true

With both set, git pull rebases your branch onto the remote and stashes and restores your local changes around it, all in one command.

git