Committing changes

Last updated on
23 April 2026

When one or more contributors make and review a patch on an issue, and you agree that the patch should be committed to your project, you need to commit the change in a way that gives all of the contributors proper credit. Here are the steps:

  1. Clone, update, and/or check out the branch that the patch should be committed to. See Cloning a Drupal Git repository for details.
  2. Apply the patch with
    git apply path/to/patch/file.patch
  3. Use git add commands, such as git add -u and/or git add -A to add all of the changes (modified, deleted, and added files) from the patch to the commit.
  4. Verify that everything is ready using git status and/or git diff --cached.
  5. Visit issue page to confirm that the title is an accurate 1-line summary of the change, and verify all the other issue metadata (category, component, etc.) is correct.
  6. Visit the Contribution Record (linked from the issue page) to grant credit to everyone who contributed to patching, reviewing, testing, and making useful suggestions. See Granting credit to issue contributors for more information.
  7. At the bottom of the Contribution Record, you can modify the commit message (to define the correct commit type), copy the resulting message, and paste it into the terminal window to make the commit. Review The format of the Git commit message for more information and help selecting the right commit type string to use.
  8. Push the changes to the repository with git push.

Tags

Help improve this page

Page status: No known problems

You can: