As in Whymarrh’s Response and Donnie’s comment , I think you are probably best served by simply committing, I note, however, that:
If you really want to use prefixes and reorder them, you can configure refs/stash when you work ...
This can be done without using git stash pop . It is just hard. (Edit: I see, re-reading that this was an idea in Whymarrh's answer.)
The reflog file, .git/logs/refs/stash , contains reflog entries 1 through N (as many of them exist). The stash link itself contains null input.
Operation
A drop consists of deleting a specific reflog entry ( git reflog delete knows how to handle a special null register):
drop_stash () { assert_stash_ref " $@ " git reflog delete --updateref --rewrite "${REV}" && say "$(eval_gettext "Dropped \${REV} (\$s)")" || die "$(eval_gettext "\${REV}: Could not drop stash entry")"
(where clear_stash removes the refs/stash ). The $REV argument is either refs/ stash@ {N} or refs/stash , unless you specify one.
The store operation inserts a record to zero using git update-ref :
[snip] w_commit="$1" if test -z "$stash_msg" then stash_msg="Created via \"git stash store\"." fi git update-ref --create-reflog -m "$stash_msg" $ref_stash $w_commit ret=$? test $ret != 0 && test -z "$quiet" && die "$(eval_gettext "Cannot update \$ref_stash with \$w_commit")" return $ret
Thus, it is possible, albeit a little more difficult, to perform the “roll” operation (if you are familiar with Forth or Postscript). For example, to roll the bottom three inputs one step by changing:
E stash@ {4} D stash@ {3} C stash@ {2} B stash@ {1} A stash@ {0}
in
E stash@ {4} D stash@ {3} B stash@ {2} A stash@ {1} C stash@ {0}
you just copied C to the bottom as if through a new store , and then release stash@ {3} (which has moved due to pasting to zero).
In fact, you can do this by running git stash -q store and git stash -q drop with the corresponding arguments.