yannick1976 yannick1976 - 1 month ago 12x
Git Question

Why won't --autostash option work ??? (used with git pull --rebase)

I use

git pull --rebase --autostash
all the time at work (in git bash, if that matters).

But for some reason, some of my colleagues can't get it to work, and now I discovered it doesn't work at home.

At home I'm using git 2.6.3 on a macbook.

The error message is simply :
error: unknown option `autostash'

Any ideas ?


That option is only valid for Git 2.9 (June 2016)

See "Can “git pull” automatically stash and pop pending changes?"

You can add a config

git config pull.rebase true
git config rebase.autoStash true

That way, only a git pull is needed.