0

I have git installed, and from Tools->Git->Diff, I can select Apply Chunk or Revert Chunk

enter image description here

On Linux it works, but on Windows it gives me

Unable to launch 'patch': Process failed to start: No such file or directory

Where do I need to install this patch.exe, and where do I get it from?

sashoalm
  • 75,001
  • 122
  • 434
  • 781

2 Answers2

3

There actually was patch.exe that came with Git, but it was located at "C:\Program Files\git\bin", and that wasn't added to PATH. I think that was because I didn't select the right option in the Git install wizard.

Qt Creator allows you to specify where the patch command is in its settings (the "Patch command" in the screenshot below).

enter image description here

sashoalm
  • 75,001
  • 122
  • 434
  • 781
  • This option has moved in Qt Creator 4.2.1 (and possibly earlier) to **Environment** > **System** > **Patch command**. The option can be searched for in future versions by using the Filter textbox in the top-left. Also later versions of Git for Windows install *patch* under **C:\Program Files\Git\usr\bin**. – walkingTarget Aug 09 '18 at 18:04
-1

Have you installed Git on Windows?

I'd suggest you to read the "Using msysGit on Windows" section of Qt Creator: Using Version Control Systems. I'd hope installing msysGit would provide the missing patch.exe. Maybe you still have to change any setting in Qt Creator for telling it where patch.exe is.

mgarciaisaia
  • 14,521
  • 8
  • 57
  • 81