Conventional Commits

Conventional Commits make code management easier by improving the readability and understanding of the change history and the integration and deployment process. They use prefixes and descriptions to classify changes and improve team collaboration.

Published on December 28, 2022

Views
100 views
Reading time:
Reading time: 2 min

Convencional Commits

Conventional Commits are a standardized way of writing commit messages in Git. This practice aims to make it easier to read and understand the history of changes made to a project, as well as to simplify the process of code integration and deployment.

Conventional Commits are based on the use of a specific prefix for each type of change made. Some of the most common prefixes are:

  1. feat: for new features.
  2. fix: for bug fixes.
  3. refactor: for changes that don't affect the code's behavior but improve its structure or readability.
  4. style: for changes related to how the code is written, such as adding spaces or fixing syntax errors.
  5. test: for changes related to adding or improving tests.

In addition to these prefixes, Conventional Commits also include a short title and a more detailed description of the commit. The title should be written in lowercase and should be brief and concise, while the description should provide more details about the change made.

An example of a Conventional Commit could be:

feat: agregar soporte para autenticación con Google

Se ha agregado la opción de iniciar sesión con la cuenta de Google. Se ha añadido un botón de "Iniciar sesión con Google" en la pantalla de inicio de sesión y se ha implementado la lógica necesaria para validar la autenticación con Google.
En resumen, los Conventional Commits son una forma eficiente de documentar y comunicar los cambios realizados en un proyecto de software. Su uso puede mejorar la colaboración y el trabajo en equipo, así como hacer más sencillo el proceso de integración y despliegue de código.