You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Join now to unlock these features and more
I cannot seem to find a way to create a patch (or diff) for a subset of files for a commit.
How do I create a patch (diff) file for only the selected files?
I'm afraid there isn't an option to create patch per file or for individual files in commits. This is possible only if the changes are not committed.
Feel free to submit an enhancement request on jira.atlassian.com for the Sourcetree team to consider this feature in a future release.
Sourcetree Mac Developer
As far as I know, this feature is still not implemented in the latest sourcetree version.
But, actually, what you want is possible when creating a patch file from your working copy changes. So there is a workaround by performing the following steps:
Step 1 may not be needed in every case, but may be helpful to avoid a lot of merge conflicts and to make sure that all changes of the desired commit are included in the patch file.