Here, I’m going to explain to you about the stash command. I have also explained terms like a branch, checkout, and clone concept earlier. Do check them out. It’ll help you to have a brief idea about Git terminologies. Stash command takes the state of your working directory.
It can take the state of a modified files. It allows one to save temporary changes. One can modify files, other changes and save it. For example, a developer is working on multiple features or a bug that needs code changes.
The required changes can arise in the middle of a feature development. One can save it on a first in last out stack. Developers can simply stash changes. And then they checkout a new branch to work on required changes.