How to combine multiple stashes in git

It’s a little involved, but this almost always works:

  1. Pop the first stash

    $ git stash pop
    
  2. Temporarily commit the changes from the first stash

    $ git add . && git commit -am 'WIP'
    
  3. Pop the second stash

    $ git stash pop
    
  4. Undo the temporary commit, keeping the changes it introduced

    $ git reset --soft HEAD^
    

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)