jospratik
jospratik

Reputation: 1674

How can I find changes stashed on a particular date?

I have stashed many changes, so I have at least 10 to 15 in my git stash list.

I'm looking for a particular change, but it is rather tedious to look through the contents of each one of the entries in the list.

However, I do know on what date the changes were stashed, so I was wondering if there is some way to filter the list by creation date?

Upvotes: 1

Views: 175

Answers (2)

gipi
gipi

Reputation: 2515

A stash is a special commit and git stash list is a shortcut for git reflog refs/stash and takes the same arguments

So, if you want the stash from the April 04 you can use

git stash list --since='Apr 04'

Upvotes: 5

sinhix
sinhix

Reputation: 863

It's up to you to manage your stash list. Maybe you should just add the date in the stash message with

git stash save "enter date"

EDIT : I thought you could custom the stash message automatically with a hook, but it doesn't seem that way eventually

Upvotes: 0

Related Questions