diff: add -Naur create patch file example (#6484)
This commit is contained in:

committed by
GitHub

parent
9040e5a171
commit
96100f42d3
@@ -9,20 +9,24 @@
|
||||
|
||||
- Compare files, ignoring white spaces:
|
||||
|
||||
`diff -w {{old_file}} {{new_file}}`
|
||||
`diff --ignore-all-space {{old_file}} {{new_file}}`
|
||||
|
||||
- Compare files, showing the differences side by side:
|
||||
|
||||
`diff -y {{old_file}} {{new_file}}`
|
||||
`diff --side-by-side {{old_file}} {{new_file}}`
|
||||
|
||||
- Compare files, showing the differences in unified format (as used by `git diff`):
|
||||
|
||||
`diff -u {{old_file}} {{new_file}}`
|
||||
`diff --unified {{old_file}} {{new_file}}`
|
||||
|
||||
- Compare directories recursively (shows names for differing files/directories as well as changes made to files):
|
||||
|
||||
`diff -r {{old_directory}} {{new_directory}}`
|
||||
`diff --recursive {{old_directory}} {{new_directory}}`
|
||||
|
||||
- Compare directories, only showing the names of files that differ:
|
||||
|
||||
`diff -rq {{old_directory}} {{new_directory}}`
|
||||
`diff --recursive --brief {{old_directory}} {{new_directory}}`
|
||||
|
||||
- Create a patch file for Git from the differences of two text files, treating nonexistent files as empty:
|
||||
|
||||
`diff --text --unified --new-file {{old_file}} {{new_file}} > {{diff.patch}}`
|
||||
|
Reference in New Issue
Block a user