Subject: Re: [PATCH] pull: add pull.autoStash config option

From: Junio C Hamano <[email-masked]>
Date: Wed, 16 Jul 2025 21:37:13 -0700

Lidong Yan <[email-masked]> writes:

>>> +pull.autoStash::
>>> +       When true, Git will automatically perform a `git stash` before the
>>> +       operation and then restore the local changes with `git stash pop`
>>> +       after the merge or rebase is complete. This means that you can run
>> 
>> I wonder if you meant "pull" instead of "merge or rebase".
>
> Yes, I think I should also say that pull.autoStash only works if we set pull.rebase.

Is that wise, though?  When pull.rebase is false, shouldn't pull.autostash
pass --autostash to underlying "git merge" instead?

I've written about the interaction among three commands and
autostash in another message several hours ago, so I won't repeat
it.

https://lore.kernel.org/git/[email-masked]/