Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to generate patch of commit in Git

📅 2011-Jun-03 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ diff, git, patch ⬩ 📚 Archive

You have cloned an online Git repository, ran into a bug, found the cause, fixed it and committed it. Now, you want to submit the patch of the fix to the maintainer. The Git incantation to do this is: git format-patch origin/master

This creates a patch file that the maintainer can pull into his Git repository.

Tried with: Git 1.7.4


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧