Files
Advanced-Git/contents/apply-patch-with-commit-metadata.md
2025-07-11 03:43:15 +00:00

866 B

⬅️ Back to Sharing Changes as Patch Files

⬆️ Previous Step: Create Patch from Last Commit(s)

Apply Patch with Commit Metadata

Category: Patch & Diff

Command

git am my-changes.patch

Examples

  • Apply a patch file and preserve commit info.
git am my-changes.patch```
- **Apply a patch and add a Signed-off-by line.**

```sh
git am --signoff my-changes.patch```


#### Steps
1. Run '`git am my-changes.patch' to apply the patch and preserve commit messages, authorship, and timestamps`.


[➡️ See the Next Step: Create Patch from Uncommitted Changes](./create-patch-from-uncommitted-changes.md)

---

_Author: mike-rambil • Updated: 2024-06-10 • Tags: patch, am, apply_