Git Version Control Cookbook - Second Edition
by Kenneth Geisshirt, Emanuele Zattin(EUR), Aske Olsson, Rasmus Voss
Creating patches
In this recipe, we'll learn how to make patches out of commits. Patches can be sent via email for quick sharing or can be copied to sneakernet devices (USB sticks, memory cards, external hard disk drives, and so on) if they need to be applied to an offline computer or suchlike. Patches can be useful methods to review code, as the reviewer can apply a patch to their repository, investigate the difference, and check the program. If the reviewer decides that the patch is good, they can publish (push) it to a public repository, given that the reviewer is the maintainer of the repository. If the reviewer rejects the patch, they can simply reset their branch to the original state and inform the author of the patch that more work ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access