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
More on Commits, branches and tags
How do you write a good commit message?BeginnerWhat is the difference between `git add .`, `git add -A` and `git add -u`?BeginnerHow do you commit only part of the changes in a file?BeginnerHow do you change the last commit message or add a forgotten file?BeginnerWhat is the difference between `git switch`, `git restore` and `git checkout`?BeginnerWhat is the difference between lightweight and annotated tags?Beginner