mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-01 17:15:23 +02:00
diff: edit page (#12509)
This commit is contained in:
parent
63cd5af6bd
commit
73263d5dd8
1 changed files with 13 additions and 9 deletions
|
@ -7,26 +7,30 @@
|
|||
|
||||
`diff {{old_file}} {{new_file}}`
|
||||
|
||||
- Compare files, ignoring white spaces:
|
||||
- Compare files, ignoring [w]hite spaces:
|
||||
|
||||
`diff --ignore-all-space {{old_file}} {{new_file}}`
|
||||
`diff {{-w|--ignore-all-space}} {{old_file}} {{new_file}}`
|
||||
|
||||
- Compare files, showing the differences side by side:
|
||||
|
||||
`diff --side-by-side {{old_file}} {{new_file}}`
|
||||
`diff {{-y|--side-by-side}} {{old_file}} {{new_file}}`
|
||||
|
||||
- Compare files, showing the differences in unified format (as used by `git diff`):
|
||||
- Compare files, showing the differences in [u]nified format (as used by `git diff`):
|
||||
|
||||
`diff --unified {{old_file}} {{new_file}}`
|
||||
`diff {{-u|--unified}} {{old_file}} {{new_file}}`
|
||||
|
||||
- Compare directories recursively (shows names for differing files/directories as well as changes made to files):
|
||||
- Compare directories [r]ecursively (shows names for differing files/directories as well as changes made to files):
|
||||
|
||||
`diff --recursive {{old_directory}} {{new_directory}}`
|
||||
`diff {{-r|--recursive}} {{old_directory}} {{new_directory}}`
|
||||
|
||||
- Compare directories, only showing the names of files that differ:
|
||||
|
||||
`diff --recursive --brief {{old_directory}} {{new_directory}}`
|
||||
`diff {{-r|--recursive}} {{-q|--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}}`
|
||||
`diff {{-a|--text}} {{-u|--unified}} {{-N|--new-file}} {{old_file}} {{new_file}} > {{diff.patch}}`
|
||||
|
||||
- Compare files, showing output in color and try hard to find smaller set of changes:
|
||||
|
||||
`diff {{-d|--minimal}} --color=always {{old_file}} {{new_file}}`
|
||||
|
|
Loading…
Add table
Reference in a new issue