Interview Prep/Git & GitHub/Commits, branches and tags

What does `git stash` store and where?

BeginnerConceptCommits, branches and tags
Answer

It saves your modified tracked files and index state as commits under refs/stash, then resets the working tree to HEAD. By default untracked files are skipped; use -u to include them. It is a stack, so stash@{0} is the newest.

git stash push -u -m "wip: login form"
git stash list
git stash pop
All Git & GitHub questions Roadmap: Git & GitHub

More on Commits, branches and tags