Create a Drupal Module Patch With Git
I thought I'd written my last bit of code over 10 years ago, but here I am struggling with all this new-fangled technology and inevitably tweaking module code that makes up the great Drupal open source empire.
A quick way to generate a patch for a module you want to tweak is using Drush and Git.
1. Download the module to your test environment with Drush. FFS don't do code development on a live site - kittens will die and you might (quite rightly) lose your job.drush dl [module-name]