Skip to content

Instantly share code, notes, and snippets.

@reli
Last active November 9, 2018 12:03
Show Gist options
  • Select an option

  • Save reli/7617423 to your computer and use it in GitHub Desktop.

Select an option

Save reli/7617423 to your computer and use it in GitHub Desktop.
Drupal patch Reversing patches
apply
patch -p1 < path/file.patch
remove
patch -p1 -R < path/file.patch
Reversing patches
Last updated March 15, 2016.
You can reverse a patch if you have finished testing it, or if you want to see whether a problem has been introduced by a particular patch. You should also reverse a patch prior to adding a newer, updated version of the same patch. To reverse the patch, use the patch command with the -R option:
patch -p1 -R < path/file.patch
(If your patch was applied with the -p0 option, use that instead.)
Or:
git apply -R path/file.patch
--------------------------------------
cd /path/to/docroot/
wget https://www.drupal.org/files/issues/____...patch_file.patch
git apply patch_file.patch
drush cr
drush updb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment