Git /

How to create a patch file to send by email as contribution

1. Clone gplhost repository

   apt-get install git-core curl
   git clone http://git.gplhost.com/dtc.git

Wait for a while, the clone can take quite some time.

2. Modify the sources and commit

After the clone, cd in the dtc folder, and do any modification you want. When done, do:

   git commit -a

enter you comment in the editor that pops up, save and quit. For this example, we will say that you have entered: "Changed changelog" as the comment.

3. Create and send the resulting patch files

You will need to call git-format-patch with the latest git entry as parameter. To find this entry, go here:

   http://git.gplhost.com/gitweb/?p=dtc.git;a=summary

put your mouse over the commit link, and see the h= parameter of the link. The URL should be like this:

http://git.gplhost.com/gitweb/?p=dtc.git;a=commit;h=5688eb505af0a690d057c8b7a25bc762685b4d61

or do:

   git log

to see the last cryptic number that you will need to use.

use this in the git-format-patch command:

git-format-patch 5688eb505af0a690d057c8b7a25bc762685b4d61

This will show something like this:

   zigo@GPLHost:x300>_ ~/sources/dtc$ git-format-patch 5688eb505af0a690d057c8b7a25bc762685b4d61
   0001-Changed-changelog.txt

Then simply send the 0001-Changed-changelog.txt (or more, if there's more files if you do more than one commit).

4. Where to send the result

Best is to subscribe to the dev mailing list. Send a mail to dtcdev-subscribe at gplhost.sg to register. If your patch is bigger than 16k, then best is to send the files in any web server that you have access to, and send a link to it in the list with your comments in the body of the message saying what the patch does.

I hope this short text will help to have more contributions.

Page last modified on June 19, 2008, at 08:53 AM EST