Git: How to stash with a custom message

Updated . Posted . Visible to the public.

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.

Profile picture of Arne Hartherz
Arne Hartherz
Last edit
Arne Hartherz
Keywords
commit, name
License
Source code in this card is licensed under the MIT License.
Posted by Arne Hartherz to makandra dev (2013-01-16 09:58)