Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Filter stashes by pathspec
The documentation for git stash list
says
list [<log-options>]
List the stash entries that you currently have. Each stash entry is listed with its name (e.g.
stash@{0}
is the latest entry,stash@{1}
is the one before, etc.), the name of the branch that was current when the entry was made, and a short description of the commit the entry was based on.stash@{0}: WIP on submit: 6ebd0e2... Update git-stash documentation stash@{1}: On master: 9cc0589... Add git-stash
The command takes options applicable to the git log command to control what is shown and how. See git-log[1].
If I run an ordinary git stash list
, it shows me a list of stash@{N}
, with lots of "WIP on branch1," "WIP on branch2," and so on.
But if I try git stash list -- doc
to look for stashes specifically affecting documentation, it does this…
fatal: bad revision 'doc'
If the documentation says I can use "options applicable to the git log command," why won't it let me use path filtering? Is it possible to get the list of stashes that touch a certain pathspec?
0 comment threads