Skip to content

Instantly share code, notes, and snippets.

@podorozhny
Forked from hartym/git-stash-grep
Created May 11, 2017 13:46
Show Gist options
  • Save podorozhny/45f6295682e9bd684214660c7f22e6d3 to your computer and use it in GitHub Desktop.
Save podorozhny/45f6295682e9bd684214660c7f22e6d3 to your computer and use it in GitHub Desktop.
git stash grep (bash)
stashgrep() {
for i in `git stash list | awk -F ':' '{print $1}'`; do
git stash show -p $i | grep -H --label="$i" "$1"
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment