Patricia Sauer - Authentic Programming

Stashing with a description | The Git Stash Command

A person holding knitted textiles photo

Stashing is useful to save your local changes away. If you do it several times by using the Git stash command without cleaning up by dropping stashes which you don’t need anymore, it can get messy. It will then be hard for you to keep track of your stashes and which stash contains what.

To get a cleaner list of stashes you can give your stashes a description to memorize what changes were contained in the stash:

git stash -m "Did this and that"

After that, you can have a look at your stashes by using the git stash list command:

git stash list

The git stash list command will result in the following:

stash@{0}: On master: Did this and that

Reference

For full reference see Git stash documentation.

Liked this article?

Buy Me A Coffee

© 2018 - 2024 Patricia Sauer