Here are all the commands, starting from creating a new copy of a drupal repository and up to creating the patch to be published in the issue queue, the examples are for drupal core but the same may apply to contrib modules and themes too.
Get the codegit clone --branch 8.x http://git.drupal.org/project/drupal.git
Change directorycd drupal
Create a branchgit checkout -b branchnme
e.g.git checkout -b 766458-seven-rtl-112
Add untracked (new) filesgit add path/to/file
e.g.git add themes/seven/ie7.css
Commit changesgit commit -a -m "commit message"
e.g.git commit -a -m "issue 766458-seven-rtl add ie7.css"
Update origingit fetch origin
Make your code apply to the latest version of the codegit rebase origin/8.x
Create patchgit diff origin/8.x > patchname.patch
e.g.git diff origin/8.x > 766458-seven-rtl-112.patch
Or, if you want your patch to include author attributions (some credit for you) you should use:git format-patch origin/[branchname] --stdout > [project_name]-[short-description]-[issue-number]-[comment-number].patch
Comments