I only do that if the "bugfix" is miniscule; I've forgotten stashes, and had severely painful efforts to merge them back in. Now I only stash for a very brief period of time.
Otherwise, I use a new topic branch instead of stashing. Branching takes so little effort.
Comments
For example, this bit:
# git stash (all my changes are saved away, and I have a clean tree)
# Fix the bug
# git commit -a -m "bugfix"
# git stash pop (changes are back)
This is the type of stuff that make SVN people "get it".
I only do that if the "bugfix" is miniscule; I've forgotten stashes, and had severely painful efforts to merge them back in. Now I only stash for a very brief period of time.
Otherwise, I use a new topic branch instead of stashing. Branching takes so little effort.
I've lost code with stash. Be wary.