Walter Stanish asked this question · 1 karma · Mar 09 '13 at 04:08 PM
Sometimes when committing to a local repository a large group of changes may be applied within a commit. (I find that this happens more often when working on the console, or in a VM someplace, away from SourceTree) Later on, when I pull such changes to SourceTree from the remote, I want to prepare them for pushing upstream (where I have no write access) as patches.
Unfortunately, right now I cannot see how to achieve this.
When selecting a historic commit with multiple hunks in the same file that I wish to produce separate patches for, selecting Actions | Create Patch I am presented with two options, either:
- Patch from Working Copy (not the desired route); or
- Patch from Commits
The second option presents the file in question and each of the multiple hunks, however there is no means to select one or a subset of hunks (as I seem to remember is well implemented via the cherry pick interface elsewhere within SourceTree) to use as the basis for patch generation.
Instead, I am only given the option to Reverse the entire set of changes within the file (apparently on the working tree?) or Reverse Hunk for each hunk within the file (again, apparently on the working tree).
What I really want to do is to produce a patch from one or more hunks the have changed within one file (but ideally the option of more) within a single commit (but ideally the option of more, between arbitrary points in time).
Because the individual hunks already perfectly represent the logical objects from which patch generation is desired, it seems extremely counter-intuitive that there appears to be no way to do this.
Perhaps I am missing something?