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 Drupal.org