--- id: patch-commit title: "pnpm patch-commit " --- Generate a patch out of a directory and save it (inspired by a similar command in Yarn). This command will compare the changes from `path` to the package it was supposed to patch, generate a patch file, save the patch file to `patchesDir` (which can be customized by the `--patches-dir` option), and add an entry to [`patchedDependencies`]. Usage: ```sh pnpm patch-commit ``` * `path` is the path to a modified copy of the patch target package, it is usually a temporary directory generated by [`pnpm patch`](./patch). ## Options ### --patches-dir <patchesDir> The generated patch file will be saved to this directory. By default, patches are saved to the `patches` directory in the root of the project. [`patchedDependencies`]: ./patch.md#patcheddependencies