diff 用法

diff -Naur [from-file] [to-file] > [YourFileName.patch]
-N    In  directory comparison, if a file is found in only one directory, treat it as present but empty in the other directory.
-a    Treat  all  files as text and compare them line-by-line, even if they do not seem to be text.
-u    Use the unified output format.
-r    When comparing directories, recursively compare any subdirectories found.

所以一般檔案內容異動只要 diff -u [from-file] [to-file] > [YourFileName.patch] 應該就可以了。

如果改的東西很多,應該就用 diff -Naur [from-file] [to-file] > [YourFileName.patch]




論 Render 翻譯(算繪/演繹)

GNU 專案術語對照表