patch -p1 < changes.patch

Category: File Operations

patch -p1 < changes.patch

Apply patch stripping one leading directory component

Applies a patch file while stripping one leading directory component from file paths (common when patches are generated with full paths).
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.