Most of the time you don’t want to stash everything. Only the one file that’s in the way. git stash push takes paths for that.
git stash push -m "config experiment" -- src/config.js
Everything after -- is a pathspec, so only changes to those files go into the stash. All your other edits stay in your working tree. You can name several files or a folder, or use a pattern:
git stash push -- src/config.js tests/
git stash push -- '*.css'
The -m is optional but helps later, when git stash list otherwise shows a list of identical WIP lines. git stash pop or git stash apply bring it back like any other stash.
This is handy when you need to pull and one locally changed file blocks the merge, or when you want to test the code without one experimental change.
If you want to choose hunks rather than files, git stash push -p asks for each change. Both forms stash only tracked changes by default; a new file you name won’t be stashed unless you add -u as well. And be careful with the older git stash save syntax you’ll see in old answers online. It doesn’t take paths: it reads them as part of the message and stashes everything, which is why I’d stick to push.
Further reading: git-stash documentation