How to View Git Stash History
git stash list
allows you to view all stashed changes in your Git repository. Stashes are temporary storage areas for your working directory’s changes. Here's how to use it effectively:
1. View Stashes
Run the following command to list all stashes:
This displays a list of stashed changes in the format:
Each stash is indexed (e.g., stash@{0}
), with the most recent stash at the top.
2. Filter by Keyword
To search for specific stashes, use:
For example:
3. Customize Output
To see more details about each stash, use:
Example:
Add -p
for a detailed diff: