3

I am trying to create a patch using TortoiseGit, but I am not able to get the patch with working copy changes, means may there is no option for working copy changes in TortoiseGit. But I am able to create patch using committed changes. But I need the patch only for uncommitted changes. Please help on this.

Yue Lin Ho
  • 2,945
  • 26
  • 36
  • Answer without Tortoise: https://stackoverflow.com/questions/5159185/create-a-git-patch-from-the-changes-in-the-current-working-directory `git diff` for unstaged changes. `git diff --cached` for staged changes. Answer with TotoiseGIT: Not Possible (https://stackoverflow.com/questions/6063944/can-you-interact-with-the-index-staging-area-with-tortoisegit) – ponsfrilus Sep 06 '17 at 07:37
  • 4
    I think it is not duplicate. Because this question is TortoiseGit specific. – Yue Lin Ho Sep 13 '17 at 01:00

2 Answers2

8
  1. Open Log Message dialog, Right click on Working tree changes, and Click Show changes as unified diff

    enter image description here

  2. A TortoiseGitUDiff dialog is opened, Click the File menu, and Click the Save as...
    enter image description here

  3. Give the patch a file name, Save, and that's it.

Yue Lin Ho
  • 2,945
  • 26
  • 36
2

You can open the context menu on the Working Tree folder and select "Diff" or "Check for modifications" (you might have to hold Shift while opening the context menu).

On the following dialog there is a "Save unified-diff"-button which provides the requested functionality.

MrTux
  • 32,350
  • 30
  • 109
  • 146