Create a git diff of a file from SourceTree
23,477
Solution 1
Assuming that this question is about the Git client SourceTree, here's how to create a patch file:
- in the Log/History view, right-click on a commit
- select the context menu option "Create Patch..."
- in the "Create Patch" dialog window, select the commits to include in the patch, choose the location of your patch file on the filesystem, and click "Create Patch".
Solution 2
In case you want to make a Patch from not committed changes (in other words from Patch from Working Copy):
- Choose the "Working Copy" Tab
- Tick the check box to select all files
- Click Create patch
Solution 3
git diff commitid1 commitid2 > patch.diff
Author by
Lakshmanaprabhu
Updated on September 23, 2021Comments
-
Lakshmanaprabhu over 2 years
How to create a patch file from a Source Tree Actually, i need to create a patch file of a specific modified file. i can view this using External diff or git diff filename in git bash.