Skip to end of metadata
Go to start of metadata

How to write a commit message

When you contribute code to the PrestaShop project (through Github), we ask that you strictly use the PrestaShop way of writing a commit message. This way, when building the code history, your commit message will fit nicely with the ones from the PrestaShop developers.

Commit messages must be in English, and have to be formatted like this:

Type

The type is the general idea behind your commit: are you fixing a bug, making an improvement, etc.?

Type

Meaning

[-]

Bug fix.

[*]

Improvement.

[+]

New feature.

[~]

Feature deprecation.

Please make sure that one commit does only one thing. If you made both fixes and improvement in the code, either use the most important change in the commit message, or make two commits.

Category

The category is the portion of the project to which your changes apply to.

Category

Meaning

FO

Front-office (theme, front controller, images, CSS, JavaScript, etc.).

BO

Back-office (theme, admin controller, images, CSS, JavaScript, etc.).

Installer

All the files in the /install folder.

TR

The translation files.

MO

Modules. Please specify the module's name in the content of commit message.

Deprecated

When deprecating some code. Please specify the class name and its function name.

Security

Security fixes, such as XSS fixes.

Project

Changes affecting the entire project.

PDF

PDF template modifications.

WS

Web Service.

LO

Localization pack.

Description

Use the description to explain what your commit does in a few words.

If you fixed a bug, please specify the bug's Forge number in the description (eg: #PSCFV-007).

Sample commit message

Here are a few sample messages:

New files

If you add new files, they need to have the "NOTICE OF LICENSE" and the "DISCLAIMER" sections at the start of the file.

You can copy/paste from existing files in the project.

You can also use this for general files:

...or for modules...

  • No labels