Skip to content

Commit message rules

lordloki edited this page Sep 15, 2018 · 1 revision

All commit messages should respect some rules. These rules are applied only on all commits in master, commits in separated branch are considerate as experimental and then less restrictive in their message.

The rules for the title are:

  • prefix all commits of UPBGE: and don't forget the space after the colon
  • the sentence should be with a capital and a dot at the end
  • the sentence should be a good ratio clear/short
  • a bug fix commit sentence should begin with Fix
  • if it concerns an issue or a pull request the message is suffixed by (#XXX) where XXX is the number of the pull request or issue.

In case of a commit implementing area lamps:

UPBGE: Implement area lamps. (#300)

In a different case of a fix commit related to GPUTexture reload for the special situation of cube maps:

UPBGE: Fix cube maps GPUTexture reload. (#200)

The description of the commit is needed for all feature commits and for most of bug fix commit. The description can be empty for short cleanups where the title already explains everything:

UPBGE: Replace getName by GetName in RAS_Texture.

Or for short explicit bug fix commit:

UPBGE: Fix not deleted m_body in CcdPhysicsController.

Like for the title the description has different rules for feature commits, bug fix commits or cleanup commits.

Feature commits:

  • explain what was impossible before or what were the workarounds.
  • explain how the request was resolved = what you added at the original idea
  • explain major and if possible minor issues encountered
  • explain how these issues were fixed

Bug fix commits:

  • explain the consequences of the bug
  • explain the causes of the bug
  • explain the fix and the side effects possible

Cleanup commits:

  • Explain what operations were made on the code
Clone this wiki locally