Skip to the content.

Git Commit Message Template

This repository contains a Git commit message template designed to help standardize and streamline commit messages in your projects. Consistent and clear commit messages are essential to maintaining a readable and maintainable project history. This template provides a simple, easy-to-follow structure for writing meaningful commit messages. It is based on the recommendations of Conventional Commits.

Tips for Git Messages

  1. Separate the title from the description with a blank line.
  2. The title should not exceed 50 characters.
  3. Capitalize the first word of the title.
  4. Do not end the title with a period.
  5. Use the imperative mood in the title line.
  6. The description should not exceed 72 characters per line.
  7. Use the description to explain what and why, instead of how.

Commit Structure

Title (Subject Line)

feat: add user authentication

Body (Detailed Description)

Fix issue with the user login process
by updating the authentication method. The previous method
was not compatible with new security requirements.

This fix ensures users can log in
without errors and improves overall application security.
Closes #123

Note

Note:
Special instructions, test steps, rake tasks, etc.

Co-author

Co-authored-by: John Doe <john.doe@example.com>

Example Commit Message

feat: add user authentication

Add a new feature for user authentication
using JWT. This feature allows users to log in
securely and receive a token for subsequent requests.

- Implement JWT-based authentication
- Add middleware to protect routes
- Update user model with authentication methods

Closes #45

Note:

- Update environment variables with the secret key.
- Apply database migrations.

Co-authored-by: Jane Doe <jane.doe@example.com>

How to Use the Template

  1. Clone the Repository: Clone this repository to your local machine.
git clone git@github.com:brayandiazc/template-gitmessage.git
  1. Navigate to the Root Directory: Move to the directory where you cloned the repository.
cd template-gitmessage
  1. Copy the Template File: Copy the .gitmessage file to your home directory.
cp .gitmessage ~
  1. Configure Git: Set the template as your default commit message template by running the following command:
git config --global commit.template ~/.gitmessage

Contributing

Contributions are welcome. Before you start, take a look at:

Documentation

Supporting documentation lives in docs/: roadmap and decisions (ADRs).

Author

License

This project is licensed under the MIT License - see the LICENSE file for details.


⌨️ with ❤️ by Brayan Diaz C 😊