git stash reporting: '' is not a stash reference

后端 未结 3 695
故里飘歌
故里飘歌 2020-12-30 23:56

Not quite sure what\'s happened, but git stash seems to be in a bad place.

% git stash list
stash@{0}: filter-branch: rewrite
stash@{1}: filter-branch: rewri         


        
3条回答
  •  無奈伤痛
    2020-12-31 00:16

    You don’t have to nuke all of your stashes. You can delete just the broken ones manually using git reflog. In your case:

    git reflog delete --rewrite stash@{1}
    git reflog delete --rewrite stash@{0}
    

    (I put these in reverse order here because every deletion decreases the numbering of the following entries. In practice, don’t bother doing the math mentally, just do git stash list after every deletion to get an updated list and pick another remaining broken entry from that.)

提交回复
热议问题