Often when I work on a feature branch with git, I find a bug and start fixing it right away. I don't want to switch since the new feature is often what I need to reproduce the bug. After a while I have 2-3 files that contains the bug fix plus some other non-committed files containing the new feature I'm working on.
Now I would like to merge only the bugfixed files with the master branch without merging the whole feature branch. What is the best way of doing that?
Stash saves all files, so it's not perfect. My last solution was to commit the fix, switch to master, cherry-pick, then update the Changelog and amend... It feels like I haven't found a good enough solution, so I'm asking here!