1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-11-02 01:18:00 +01:00
tldr/pages/common/patch.md

17 lines
318 B
Markdown
Raw Normal View History

2015-10-22 09:31:52 +02:00
# patch
2014-10-25 13:20:07 +02:00
> 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 13:20:07 +02:00
- Apply a patch:
2014-10-25 13:20:07 +02:00
`patch < {{patchfile}}.diff`
- Apply a patch to current directory:
2014-10-25 13:20:07 +02:00
`patch -p1 < {{patchfile}}.diff`
- Apply the reverse of a patch:
2014-10-25 13:20:07 +02:00
`patch -R < {{patchfile}}.diff`