A Real, Small Improvement
git commit -am "Add herbal tea recipe"
Turning It Into a Real, Shareable File
git format-patch -1 -o /tmp/patches
A real, genuine plain-text file — the commit's real message, author, and diff, all in one file that can travel anywhere.
Applying It on a Completely Separate Clone
git am /tmp/patches/0001-Add-herbal-tea-recipe.patch
No fetch, no pull, no shared remote involved at all — git am reads the real patch file directly and recreates the exact same real commit.
Not every real contribution happens through a shared remote. Contributors without push access, code review conducted entirely over email, and real projects that predate GitHub itself all rely on the same, genuine underlying mechanism: a commit turned into a real, plain-text file that can travel anywhere a file can — attached to an email, dropped in a shared folder, posted to a mailing list.
git format-patch turns a real commit into exactly that kind of file. git am applies it on the other end, genuinely recreating the same real commit — same message, same author, same actual change — on a completely separate clone that never fetched or pulled from anywhere.
git format-patch
Converts one or more real commits into genuine, plain-text patch files — each one containing the real commit message, author, and diff. Confirmed directly in this lab: the generated file was a real, readable text file, not a binary format.
git am
Applies a real patch file generated by format-patch, genuinely recreating the original commit — same message, same author, same actual change. Confirmed directly in this lab: the second clone, which never fetched or pulled anything, ended up with the exact same real commit.
Takeaways
- git format-patch turns one or more real commits into genuine, plain-text patch files
- git am applies a real patch file directly, recreating the original commit's message, author, and change
- This real workflow requires no shared remote at all — the patch file itself is the entire transport mechanism
- It remains a genuinely active, real workflow today — including in large projects like the Linux kernel