Reviewing patches-commit message format » History » Version 6
Commit messages should follow the following conventions:
- Provide a brief description of the change in the first line, including a Redmine issue number, e.g.
fixes #9999 - adds the ability to launch mars probe in V2 API.
- Insert a single blank line after the first line.
- Optionally, provide a detailed description of the change in the following lines, breaking paragraphs where needed.
- Ensure the description is of the change and not the bug title, e.g. "X now accepts Y when doing Z" rather than "Z throws error"
- Multiple ticket numbers may be given, comma-separated
- By adding 'fixes #<issue number>' redmine will auto close the issue when merged.
- By adding 'refs #<issue number>' redmine will auto add the commit to an existing issue (usually an already closed issue).
How to update it¶
git commit --amend
git push -f origin
This will change the existing commit on your branch, then replace the branch on "origin" (swap with the name of your remote if you changed it).