Git: auto-stashing to avoid conflicts on pull

Updated . Posted . Visible to the public.

First, decide if you want to pull with rebase. There are some implications of changing this, so think before you do it.


If you do, you can tell git to stash automatically before pulling:

git config --global rebase.autoStash true

Now on pull, git will a) stash, b) pull and c) reapply your working tree. Note that applying your changes may lead to unresolvable conflicts!

Further see a common git config with this configuration enabled.

Dominik Schöler
Last edit
Emanuel
License
Source code in this card is licensed under the MIT License.
Posted by Dominik Schöler to makandra dev (2016-02-02 14:55)