The purpose of using git stash is to temporarily save changes that you have made in your working directory but do not want to commit yet. This allows you to switch branches or pull updates without losing your uncommitted changes. When you stash your changes, Git saves them on a stack, and you can later apply or pop them back into your working directory when you're ready to continue working on them. This is particularly useful for keeping your working directory clean while you work on different tasks.
