Git: How to stash with a custom message

If you say git stash, your stashed changes will be identified with an automatically generated message:

$ git stash
Saved working directory and index state WIP on master: 77af0df Merge branch 'production'

While this is okay to temporarily stash away stuff, you may want a better identifier for your changes so you can find them more easily if you stash often.
Of course, there is a way to do it with git:

$ git stash save doing crazy things
Saved working directory and index state On master: doing crazy things

Note that you need to supply the save keyword if you want to add a message.

Arne Hartherz Over 11 years ago