Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I have found an issue on drupal.org that I would like to submit an solution for. How can I create a patch using git so that I can submit it as a possible fix?

share|improve this question
We want to avoid the easy questions during private beta. This can be easily answered by looking at the documentation. – user7 Mar 3 '11 at 21:21

1 Answer

up vote 11 down vote accepted

Every Drupal.org project has a tab title 'Version control', click on it and it will take you to a page with Git instructions, including a section titled 'Creating a patch'.

See here for an example: http://drupal.org/project/wysiwyg_fields/git-instructions

Code below is copied from the D.o. instructions.

git checkout -b [description]-[issue-number]

Make your changes. Note the change in syntax for issue-related commit messages. See the Commit messages page for details.

git add -A
git commit -m "Issue #[issue number] by [comma-separated usernames]: [Short summary of the change]."

Roll the patch.

git status
git fetch origin
git rebase origin/6.x-1.x
git format-patch origin/6.x-1.x --stdout > [description]-[issue-number]-[comment-number].patch
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.