Read more

Git: auto-stashing to avoid conflicts on pull

Dominik Schöler
February 02, 2016Software engineer at makandra GmbH

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


Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

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.

Posted by Dominik Schöler to makandra dev (2016-02-02 15:55)