Translations:Source code management/49/en

Creating patches from git
There are times when one may need to create a patch instead of submitting a PR. The following workflow explains how to do this:  Make sure you are in the correct branch (i.e. not the master branch) by checking with git branch -v  Create the patch: we do this by using the git format-patch command which we patch against the master branch and redirect to STDOUT. We create the patch in the directory outside of the source build (in order not to pollute the source dir itself, this is optional as you can decide the location wherever you want the patch to be created) git format-patch master --stdout > ../patch.name.patch  