General, simplest way: 1. * Fetch source from git repository. (See here.) 2. * edit the files that you want to modify 3. * git diff > my_patch.diff