Skip to content

Instantly share code, notes, and snippets.

@dohaivu
Last active June 5, 2017 04:32
Show Gist options
  • Save dohaivu/5475337 to your computer and use it in GitHub Desktop.
Save dohaivu/5475337 to your computer and use it in GitHub Desktop.
Useful tips for #git message

Why is this change necessary?

This question tells reviewers of your pull request what to expect in the commit, allowing them to more easily identify and point out unrelated changes.

How does it address the issue?

Describe, at a high level, what was done to affect change. “Introduce a red/black tree to increase search speed” or “Remove , which was causing ” are good examples.

If your change is obvious, you may be able to omit addressing this question.

What side effects does this change have?

This is the most important question to answer, as it can point out problems where you are making too many changes in one commit or branch. One or two bullet points for related changes may be okay, but five or six are likely indicators of a commit that is doing too many things.

Your team should have guidelines and rules-of-thumb for how much can be done in a single commit/branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment