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

前端 未结 7 2099
佛祖请我去吃肉
佛祖请我去吃肉 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:48

    this command enables you to look all stashed changes.

    git stash list
    

    Here is the following command use it to clear all of your stashed Changes

    git stash clear
    

    Now if you want to delete one of the stashed changes from stash area

    git stash drop stash@{index}   // here index will be shown after getting stash list.
    

    Note : git stash list enables you to get index from stash area of git.

提交回复
热议问题