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:
- Clone, update, and/or check out the branch that the patch should be committed to. See Cloning a Drupal Git repository for details.
- Apply the patch with
git apply path/to/patch/file.patch - Use
git addcommands, such asgit add -uand/orgit add -Ato add all of the changes (modified, deleted, and added files) from the patch to the commit. - Verify that everything is ready using
git statusand/orgit diff --cached. - 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.
- Copy the command, and paste it into the terminal window to make the commit.
- Push the changes to the repository with
git push.
Help improve this page
Page status: No known problems
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion
Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.