diff和patch
Linux程序员通过补丁文件(patch)进行代码交流。
diff来创建patch文件
diff -u original new > original.patch
diff -ruN original/ new/ > original.patch
patch来应用patch文件
patch -p0 < original.patch
-p[NUM] 表示去掉补丁文件的路径 NUM个 /
Linux程序员通过补丁文件(patch)进行代码交流。
diff来创建patch文件
diff -u original new > original.patch
diff -ruN original/ new/ > original.patch
patch来应用patch文件
patch -p0 < original.patch
-p[NUM] 表示去掉补丁文件的路径 NUM个 /