Jump to: navigation, search

Sahara/GitCommits

< Sahara
Revision as of 12:09, 22 July 2013 by Sergey Lukjanov (talk | contribs) (Created page with "This document is a short tutorial with requirements and tips for committing to Savanna. == Git commit good practice == * one "logical change" per commit: ** don't mix whites...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This document is a short tutorial with requirements and tips for committing to Savanna.

Git commit good practice

  • one "logical change" per commit:
    • don't mix whitespace/refactoring changes with functional code changes;
    • don't mix two unrelated functional changes (or functional with whitespace/refactoring changes);
    • don't send large new features in a single giant commit;
  • change request subject (first line of the commit message):
    • it should start from the upper case letter;
    • avoid usage of ':' in the subject (remember that it'll be displayed in the following form: "Change I1de3f893: Refactoring unit tests for validation");
    • avoid trailing punctuation;
  • specify bugs and blueprints in commit message:
    • bugs should be specified one per line in the following format: "Fixes: bug #123456" or "Partially fixes: bug #123456";
    • blueprints should be specified after blueprints one per line in the following format: "Implements blueprint name-of-blueprint" or "Partially implements blueprint name-of-blueprint";
  • make commit message clearer:
    • 'Change-Id: IXXX' should be the last line and separated with empty line from the rest message;
    • separate bugs/blueprints with the empty lines before and after;


More info about git commit messages and gerrit workflow: