Command-line tool
gpatch
brew/gpatch
Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev
Apply a diff file to an original
At a glance
- Type
- Command-line tool
- Install on
- Windows, macOS, Linux
- Last checked
- 25 Oct 2026, 21:09 UTC
Install it
Windows
winget install --id GnuWin32.Patch -e scoop install patch
macOS
brew install gpatch
Linux
brew install gpatch
Apply a patch using a diff file (filenames must be included in the diff file)
patch -i patch.diff
Apply a patch to a specific file
patch -i patch.diff path/to/file
Patch a file writing the result to a different file
patch -i patch.diff path/to/input_file -o path/to/output_file
Related command-line tools
- astyle
Source code beautifier for C, C++, C#, and Java - wiggle
Program for applying patches with conflicting changes - svgo
Nodejs-based tool for optimizing SVG vector graphics files svgo svg optimize minify - xdelta
Binary diff, differential compression tools - zeek
Network security monitor - mpatch
A smart, context-aware patch tool that applies diffs using fuzzy matching, ideal for AI-generated code. - pdf-diff
Tool for visualizing differences between two pdf files - diffutils
File comparison utilities vue tauri diff
Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents