Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Add directions for applying patches and abandoning local changes
Add directions for applying patches and abandoning local changes
Comments
Comment #1
eliza411 CreditAttribution: eliza411 commentedThe following sections were added today. They were reviewed by sdboyer and webchick in IRC.
Applying a patch
If you have not already cloned the repository, follow the directions above for setting up this repository in your local environment. Be sure you are on the branch you wish to patch and that it is up-to-date using the following commands:
git checkout --track origin/[@branchname]
git pull origin [@branchname]
Next, download the patch to your working directory to apply it. There are many variables involved in applying patches, so if the following command doesn't work for you, see Applying patches for more detail.
git apply [patch.name]
Finally, remove the patch file:
rm [patch.name]
Abandoning your local changes
Abandon changes to a specific file:
git checkout [filename]
Abandon changes to the whole working tree:
git reset --hard