You could use
git add -p <path> to stage the chunks that you want to keep in a particular file, then
git checkout -- <path> to discard the working tree changes that you didn't want to keep, by checking out the staged version of the file.
Finally, you can use
git reset -- <path> to revert the staged version of the file to the most recent committed version of the file to leave you with your changes unstaged (if you don't want to commit them).