This repository contains a Git message template designed to help standardize and streamline commit messages across your projects. Consistent and clear commit messages are essential for maintaining a readable and maintainable project history.
Some tips so that the content of our commits is precise, easy to write, easy to read, and easy to interpret.
- Separate the title from the description using a blank line.
- The title must not contain more than 50 characters.
- Capitalize the first word of the title.
- Do not end the title with a period.
- Use the imperative mood in the title line.
- The description must not contain more than 72 characters per line.
- Use the description to explain what and why versus how.
- feat: New feature
- fix: Bug fix
- refactor: Refactoring code
- style: Formatting, missing semi-colons, etc.; no code change
- docs: Changes to documentation
- test: Adding or refactoring tests; no production code change
- chore: Changes to the build process or auxiliary tools and libraries such as documentation generation
- perf: Code change that improves performance
- ci: Changes to our CI configuration files and scripts (e.g., GitHub Actions, CircleCI)
- build: Changes that affect the build system or external dependencies (e.g., gulp, broccoli, npm)
- revert: Reverts a previous commit
- wip: Work In Progress; for intermediate commits to keep patches reasonably sized
- hack: Temporary fix to make things move forward; please avoid it
- Purpose: Summarizes the changes concisely.
- Format:
<type>: <subject>
- Example:
feat: add user authentication
- Purpose: Provides a more detailed explanation of the changes made and why they were made.
- Format: Use the imperative mood (e.g., "Add", "Fix", "Update"). Wrap text at 72 characters. Separate paragraphs with a blank line.
- Example:
Fix issue with user login process by updating
the authentication method. The previous method
was not compatible with the new security requirements.
This fix ensures that users can log in without errors
and improves the overall security of the application.
- Purpose: Includes any additional information, such as related issue numbers or references.
- Format: Use keywords like
Closes
,Fixes
,Refs
, followed by the issue number. - Example:
Closes #123
- Purpose: Special instructions, testing steps, rake tasks, etc.
- Example:
Note:
Special instructions, testing steps, rake, etc.
- Purpose: Include for all contributors at the end of the commit message.
- Format:
Co-authored-by: name <user@users.noreply.github.com>
- Example:
Co-authored-by: John Doe <john.doe@example.com>
feat: add user authentication
Add a new feature for user authentication using JWT. This feature allows
users to securely log in and receive a token for subsequent requests.
- Implemented JWT-based authentication
- Added middleware to protect routes
- Updated user model to include authentication methods
Closes #45
Note:
- Remember to update environment variables with JWT secret key.
- Ensure database migrations are applied before testing.
Co-authored-by: Jane Doe <jane.doe@example.com>
- Clone the Repository: Clone this repository to your local machine.
git clone git@github.com:brayandiazc/template-gitmessage.git
- Navigate to the Root Directory: Change to the directory where you cloned the repository.
cd template-gitmessage
- Copy the Template File: Copy the .gitmessage file to your root directory.
cp .gitmessage ~
- Configure Git: Set the template as your default commit message template by running the following command:
git config --global commit.template ~/.gitmessage
This project is licensed under the MIT License - see the LICENSE file for details.
⌨️ with ❤️ by Brayan Diaz C 😊