patch文件的产生: diff >test.patch svn diff >test.patch 具体看diff命令的用法. patch的使用: 进入比较的文件夹,patch -p0 <test.patch 还原patch前的文件夹,patch -r -p0 <test.patch 一切就是这么简单!!!