In this recipe, we'll learn how to make patches out of commits. Patches can be sent via e-mails for quick sharing or copied to sneakernet devices (USB sticks, memory cards, external hard disk drives, and so on) if they need to be applied on an offline computer or the like. Patches can be useful methods to review code as the reviewer can apply the patch on his repository, investigate the diff, and check the program. If the reviewer decides the patch is good, he can publish (push
) it to a public repository, given the reviewer is the maintainer of the repository. If the reviewer rejects the patch, he can simply reset his branch to the original state and inform the author of the patch that more work is needed before the patch can be accepted.
Git Version Control Cookbook
Git Version Control Cookbook
Overview of this book
Table of Contents (19 chapters)
Git Version Control Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Navigating Git
Configuration
Branching, Merging, and Options
Rebase Regularly and Interactively, and Other Use Cases
Storing Additional Information in Your Repository
Extracting Data from the Repository
Enhancing Your Daily Work with Git Hooks, Aliases, and Scripts
Recovering from Mistakes
Repository Maintenance
Patching and Offline Sharing
Git Plumbing and Attributes
Tips and Tricks
Index
Customer Reviews