Can I list the names of the modified files in a stash, without their contents?
While searching, I only found people printing the whole diff, couldn't manage to view the filenames only.
Git Stash List. The Git stash list command will pull up a list of your repository's stashes. Git will display all of your stashes and a corresponding stash index. Now, if you wish to view the contents of a specific stash, you can run the Git stash show command followed by stash@ and the desired index.
git stash temporarily shelves (or stashes) changes you've made to your working copy so you can work on something else, and then come back and re-apply them later on.
The show
sub-command, in the end, invokes git diff
with whatever flags you have set, or --stat
if you did not set any, so simply git stash show --name-only
, which runs git diff --name-only
between the base commit and the work-tree commit.
(See here and here for a description of what I have taken to calling a "git stash-bag". You get a diff between the commit the bag hangs from, and the w
commit.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With