-
Notifications
You must be signed in to change notification settings - Fork 1
Github Style Guide
The following description documents the style guide recommended for GitHub Commit Messages, Pull Requests, Branches, etc that are to be followed when contributing to the Milo IDE. This guide is based on Udacity's GitHub Style Guide
We are following the GitFlow Workflow by Atlassian as our main workflow. Some guidelines regarding branches and the workflow specific to Milo:
- Contributions to
developandmasterbranches need to be reviewed before they are accepted. - Branch names that are pushed to GitHub during development should be hyphenated. Eg:
my-feature-branch - Apart from
developandmasterother branches should only be temporary while development is in progress and must eventually be deleted after being merged with develop or master. - In case a branch contains a long term set of features that may not be merged with develop it must be prefixed with
experimental- - Branch names must additionally follow the following suffix conventions where the branch-name is suffixed with the following to denote special meaning:
-
-updatefor updates to existing features -
-mergefor a merge branch of multiple feature branches when they are being tested before finally merging withdevelopormaster -
-fixfor bug fixes to existing features -
-integrationfor use when new functionality/tools/features are being integrated with existing code -
-backupfor temporary use when testing updates to develop -
-releasefor release branches
-
A commit messages consists of three distinct parts separated by a blank line: the title, an optional body and an optional footer. The layout looks like this:
type: subject
body
footer
The title consists of the type of the message and subject.
The type is contained within the title and can be one of these types:
feat: a new feature
fix: a bug fix
docs: changes to documentation
style: formatting, missing semi colons, etc; no code change
refac: refactoring production code
test: adding tests, refactoring test; no production code change
devops: updating build tasks, package manager changes,updates to configs, etc; no production code change
wip: Work in progress - for commits that are not complete but need to be checked in
Subjects should be no greater than 50 characters, should begin with a capital letter and do not end with a period.
Use an imperative tone to describe what a commit does, rather than what it did. For example, use change; not changed or changes.
Not all commits are complex enough to warrant a body, therefore it is optional and only used when a commit requires a bit of explanation and context. Use the body to explain the what and why of a commit, not the how.
When writing a body, the blank line between the title and the body is required and you should limit the length of each line to no more than 72 characters.
The footer is optional and is used to reference issue tracker IDs.
Example Commit Message
feat: Summarize changes in around 50 characters or less
More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of the commit and the rest of the text as the body. The
blank line separating the summary from the body is critical (unless
you omit the body entirely); various tools like `log`, `shortlog`
and `rebase` can get confused if you run the two together.
Explain the problem that this commit is solving. Focus on why you
are making this change as opposed to how (the code explains that).
Are there side effects or other unintuitive consequenses of this
change? Here's the place to explain them.
Further paragraphs come after blank lines.
- Bullet points are okay, too
- Typically a hyphen or asterisk is used for the bullet, preceded
by a single space, with blank lines in between, but conventions
vary here
If you use an issue tracker, put references to them at the bottom,
like this:
Resolves: #123
See also: #456, #789
Copyleft The Milo Project 2018