Sharing your work
Git lets you work without connecting to the Internet. Eventually, you'll want to share your work.
There are two ways to do this, creating a patch or pushing your new code to the master repository.
Making a patch...
A patch file is a description of the changes that have been committed. Another developer can apply your patch files to their code to use your new code.
The format-patch command will collect your changes and create one or more patch files. The patch files will be named with a number, a description and .patch
.
How to do it...
The format-patch command requires an identifier to tell Git what the first patch should be. Git will create as many patch files as it needs to change code from what it was then to what it should be.
There are several ways to identify the starting snapshot. One common use for a set of patches is to submit the changes you've made to a given branch to the package maintainer.
For example, suppose you've created a new branch off the master for a new feature...