oliverdavies.uk/source/_posts/2013-12-24-quickly-apply-patches-using-git-and-curl-or-wget.md
2015-04-01 00:05:56 +01:00

852 B

title nav use description tags
Quickly Apply Patches Using Git and curl or wget blog
posts
How to quickly download a patch file and apply it to a Git repository in one line
Git
Drupal Planet

Testing a patch file is usually a two-step process. First you download the patch file from the source, and then you run a separate command to apply it.

You can save time and typing by running the two commands on one line:

$ curl http://drupal.org/files/[patch-name].patch | git apply

Or, if you don't have curl installed, you can use wget:

$ wget -q -O - http://drupal.org/files/[patch-name].patch | git apply

These commands need to be run within the root of your Git repository (i.e. where the .git directory is).

These snippets were taken from Applying Patches with Git on Drupal.org.