How can I delete all of my Git stashes at once?

前端 未结 7 2102
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-22 14:42

How can I delete all of my Git stashes at once?

Specifically I mean, with typing in one command.

7条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-22 14:47

    There are two ways to delete a stash:

    1. If you no longer need a particular stash, you can delete it with: $ git stash drop .
    2. You can delete all of your stashes from the repo with: $ git stash clear.

    Use both of them with caution, it maybe is difficult to revert the once deleted stashes.

    Here is the reference article.

提交回复
热议问题