Committing changes

Last updated on
24 September 2020

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. On the bottom of the issue page, compose the commit command, making sure that everyone who contributed to patching, reviewing, testing, and making useful suggestions is credited. See Granting credit to issue contributors for more information.
  6. Copy the command, and paste it into the terminal window to make the commit.
  7. Push the changes to the repository with git push.

Tags

Help improve this page

Page status: No known problems

You can: