Git Stash
git stash saves your uncommitted changes and gives you a clean working directory, so you can switch branches or pull without committing half-done work.
git stash pop brings the changes back and removes them from the stash list.
Stash changes and bring them back
git status --short
M index.html
git stash
Saved working directory and index state WIP on main: 5091107 Add blue style
git status --short
git stash pop
On branch main
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: index.html
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (c130c3e69c597a91601a0fc684d3515fdc51c43a)
Stash with a message
git stash push -m "WIP on header"
Saved working directory and index state On main: WIP on header
git stash list
stash@{0}: On main: WIP on header