Skip to content

Instantly share code, notes, and snippets.

@singhai0
Created March 27, 2019 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save singhai0/96eb45f04ea03c91d1a2025837dae273 to your computer and use it in GitHub Desktop.
Save singhai0/96eb45f04ea03c91d1a2025837dae273 to your computer and use it in GitHub Desktop.
See list of git stashed changes
function stashbox() {
local branch_name=$(git stash list | fzf --ansi -m --preview "echo {} | cut -d':' -f1 | xargs -I % sh -c 'git stash show --color=always % | less -R'")
if [[ $branch_name ]]; then
echo $branch_name | cut -d':' -f1| xargs git stash pop
fi
}
Courtesy: https://github.com/Brantron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment