SyntaxFix
Write A Post
Hire A Developer
Questions
You can interactively stash single lines with git stash -p (analogous to git add -p).
git stash -p
git add -p
It doesn't take a filename, but you could just skip other files with d until you reached the file you want stashed and the stash all changes in there with a.