Git: does deleting a directory remove git stashes?

Viewed 176

I have some work in directory /foo. I stashed some of my changes and now the directory is in a bad state. If I delete the directory entirely and re-clone it from github, will my stashes still be there or are they tied to the directory I made them in?

2 Answers

The stashes are stored in your .git directory as objects in the tree. So if you delete your cloned (checked out copy), you will remove all the stashes too. The better thing to do is to fix the problems of your "bad state". You might consider posting another question describing the state you're in and how you might need help fixing it.

Sure, they will be deleted. All information is stored in the .git directory inside your project.

Related