tldr/pages/common/patch.md

17 lines
301 B
Markdown
Raw Normal View History

2014-10-25 12:20:07 +01:00
#patch
> Patch a file (or files) with a diff file.
> Note that diff files contain both the target filenames and list of changes.
2014-10-25 12:20:07 +01:00
- apply a patch
`patch < {{patchfile}}.diff`
- apply a patch to current directory
`patch -p1 < {{patchfile}}.diff`
- reverse a patch
`patch -R < {{patchfile}}.diff`