Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
–1 vote
2 views
in DevOps and Agile by (29.3k points)

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

Specifically I mean, with typing in one command.

1 Answer

0 votes
by (50.2k points)

As you asked for a single command that deletes git stashes are

git stash clear 

As the documentation mentions that 

clear

Remove all the stash entries. Note that those entries will then be subject to pruning, and may be impossible to recover

Refer: https://git-scm.com/docs/git-stash#Documentation/git-stash.txt-clear

Thus you can delete all stashes at once.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...