Files
Advanced-Git/contents/apply-patch-with-commit-metadata.md
2025-07-11 02:45:16 +00:00

870 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.
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


Author: mike-rambil • Updated: 2024-06-10 • Tags: patch, am, apply