1. 程式人生 > >svn diff 和patch的使用(打補丁簡潔命令)

svn diff 和patch的使用(打補丁簡潔命令)

生成diff檔案:

svn diff > xxx.diff 

生成 patch:

同事 A 執行如下命令生成 patch:

svn diff > aaa.patch

應用 patch:

同事 B 執行如下命令應用 patch:

patch –p0 < ../aaa.patch

當他 review 完程式碼,想刪除該 patch 時, 可執行:

patch –p0 -R < ../aaa.patch