Creating patches with git diff

Submitted by Stijn Stroobants on Tue, 05/27/2014 - 22:55

After changing files of a module, you can create a patch-file. In the patch-file only the changes will be saved.

Patch-files can be easily made with the git diff command. First add the changed files to your local repository. After executing the git diff command, a file with the changes will be created.

git diff > filename.patch

The patch-file can be applied by other persons, so it's a goo idea to share it on

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.