-
Notifications
You must be signed in to change notification settings - Fork 64
Submitting Patches
Graphite accepts patches submitted to the google group generated by the git suite.
The steps to generate a patch are straightforward.
If your changes are a simple series of commits, then you can use git-format-patch to generate a patch list directly:
- git format-patch [start commit]..[end commit]
However, if your changes are not well formatted as a series of commits (which is often the case), then you will need to generate a single commit to capture the relevant changes. First, make sure that you are up to date with the latest changes:
- git pull origin master
Now create a new branch to avoid disturbing the history of your main branch:
- git checkout -b temp
Then reset this branch so that the diff from github is tracked by HEAD.
- git reset origin/master
Now your changes should shown by
- git diff
Edit these changes so that they reflect the patch you would like to submit. This can be done by editing files directly, or using "git add --patch" to select the portions to include in the final commit. Additionally, there are modules such as gitsum for emacs that can assist with this. Once the changes are ready to go, commit them to form the patch.
- git commit
Make sure to use a descriptive commit message.
Now make a patch from this commit:
- git format-patch HEAD^
This will generate a file in the local directory that should be emailed to the google group in order to submit the patch.
In order to unwind these changes, move back to your main branch (master by default):
- git checkout [branch name]
And you can delete the branch:
- git branch -D temp