###### tags: `random` # Random Tips ## 在 GitHub 專案中 Apply Patch 如果想在 clone 下來的專案中 apply 其他貢獻者的 commit,可以先找到該 commit 後,其網址最後加上 .patch,就能得到 patch 囉 ### Example 專案: https://github.com/urands/stModbus 某個 PR 的 commit: https://github.com/urands/stModbus/pull/8/commits/d081505c6405e8a6445196995ba82a15e4c34083 加上 .patch https://github.com/urands/stModbus/pull/8/commits/d081505c6405e8a6445196995ba82a15e4c34083.patch apply 這個 patch ```bash $ wget https://github.com/urands/stModbus/pull/8/commits/d081505c6405e8a6445196995ba82a15e4c34083.patch $ patch -p1 < d081505c6405e8a6445196995ba82a15e4c34083.patch ```