Venta al detalle, informática, impresoras, usb, pen, discos duros... Los mejores precios de la provincia de Tarragona!
Visítanos:
Para precios, comparativas y mucho más:
This page outlines a workflow for testing patches and code improvements, including how to download, apply, test, and improve upon patches on your local development environment that have been uploaded by others to Drupal.org's issue queues, using a Git workflow and local "topic branches".
Note: If you're unfamiliar with patching Drupal, please read the Getting Involved section on Patches.
There are also less-technical instructions in the Beginner's guides on How to Apply Patches, as well as non-Git focused instructions for applying patches on Windows and Mac OS.
git clone --branch [version] http://git.drupal.org/project/[project_name].gitgit pull
Optionally, switch to the version (aka, branch) to which you'll be applying the patch. This is not necessary if you checked out the code with git clone specifying the --branch option, as in the example above, but is needed if you typically work between multiple branches.
# List all the versions
git branch -a
# Switch to the branch (version)
git checkout [version] # e.g. version might be 7.x-2.x
git checkout -b [issue-number]-[short-description] # e.g. 123456-some-bugcd ~/path/to/[project-name] first.
curl -O http://drupal.org/files/issues/[patch-name].patch
git apply [patch-name].patchOr in a single line:
curl http://drupal.org/files/issues/[patch-name].patch | git apply -wget http://drupal.org/files/issues/[patch-name].patch
git apply [patch-name].patchOr in a single line:
wget -q -O - http://drupal.org/files/issues/[patch-name].patch | git apply -If the patch command executes without any complaints, examine the code changes in your working directory, to confirm the changes.
git diff[version] of code that is to be patched, not against the patch you downloaded.git branchgit branch -D [branch-name]patch -p1 and git am. git am is also useful if the patches were created by git format-patch.patch -p0 or git apply -p0 to apply correctly, but patches made with git should all be -p1 compatible.*.patch to the .git/info/exclude file in the project, or to a global ~/.gitignore file.