Create a patch using Git

Now, let's say we have tested this change, and want to share it with others or send it to the Koha release manager for inclusion in upcoming Koha releases. To do this, we create a patch using the command git format-patch:

koha@linux:/home/koha/kohaclone # git format-patch origin/master

Note the use of the word master in the command above; this indicates that the patch should be created against the master branch. By doing this, we ensure that the patch can be applied on the master.

The command should exit by creating a single file containing all the changes:

0001-This-adds-the-Google-Indic-Transliterater-to-the-OPA.patch

Let's take a look at this file:

koha@linux:/home/koha/kohaclone # cat 0001-This-adds-the-Google-Indic-Transliterater-to-the-OPA.patch ...

Get Koha 3 Library Management System now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.