Skip to content
NofarGizra edited this page Oct 31, 2013 · 5 revisions

##Create a new patch

  • Clone git repo of module into a clean Drupal installation.
  • Create a new branch:
git checkout -b <branch name>
  • Make change in code.
  • Commit changes:
git commit -am "fix"
  • Create Patch file:
git diff <original branch name> <new branch name> **>** <patch file name>

Original branch name is usually the module's version. Patch file name format : <issue#>-<description>-<comment#>.patch For example:

git diff 7.x-1.x fix-alert > 974338-node-notify-mailalert-17.patch

##Apply a patch

git apply <path file>