1

How do I name an existing git stash?

I have 3 different stashes all with different files, but with the same name.

stash@{0}: WIP on feat/stripe: fd8fdf8 Merge branch 'master' into feat/stripe
stash@{1}: WIP on feat/stripe: fd8fdf8 Merge branch 'master' into feat/stripe
stash@{2}: WIP on feat/stripe: fd8fdf8 Merge branch 'master' into feat/stripe

I tried

   git stash push -m "stash name"

however, I do not see how to associate it with the stash. I also get the following error.

No local changes to save

I reviewed this: How to name and retrieve a stash by name in git?

However, it does not seem to address what I need to do, or I don't understand it.

user2012677
  • 5,465
  • 6
  • 51
  • 113
  • 1
    Technically these are not stash *names*, they're just *messages* embedded in the commits and the stash reflog. I'd recommend using `git stash branch` to turn each of these stashes into actual branches, which do have actual names. I generally recommend *not* using `git stash` except for very-temporary purposes. – torek Jun 01 '19 at 18:42

0 Answers0