Last Updated: February 25, 2016
·
2.953K
· gpakosz

Git aliases: stash force apply & stash force pop

Stash force apply

git config --global alias.sfa '!git stash show -p | git apply'

Stash force pop

git config --global alias.sfp '!git stash show -p | git apply && git stash drop'

Or edit your ~/.gitconfig file:

[alias]
   sfa = !git stash show -p | git apply
   sfp = !git stash show -p | git apply && git stash drop