Daily Software Tips & Tricks
Bite-sized knowledge to improve your coding skills daily.
Stashing Untracked Files Safely
February 9, 2026
Ever needed to stash your changes but realized Git ignores all those new files you just created? The standard `git stash` won't touch untracked files by default, which can lead to confusion when you switch branches. Next time, use the command `git stash push --include-untracked` (or its shorter form, `-u`). This ensures those brand new configuration files or temporary assets are saved alongside your staged and unstaged work, preventing headaches when you switch branches and come back later to an incomplete workspace.