What is the "best" (read: "easiest", "preferred", "proper") way to divide up a set of changes among multiple branches in git? For example, assume I have made a set of (uncommitted) changes while working on branch X, but some of the changes really need to be committed to branch Y, others to branch Z, and still others to branch W; normally what I would do instinctively (like recommended here) is to stash the changes, checkout Y, apply the changes, commit only what's relevant to Y, and repeat for the other branches. The problem I run into with this is that applying the stashed changes often results in merge conflicts that have to be handled, and if I do a stash pop instead of apply (which happens often enough to be a real risk for me!), I end up intermingling changes intended for Z in the Y branch and they have to be disentangled manually.
Is there a better way? How better could I handle this situation?
Note that my question is related to questions like this one, but is different in that I seek the best way to divide a current set of changes among multiple branches. Also note that I cannot switch to Y, Z, or W prior to developing the set of changes; I have to start on X and develop the set of changes on X.