rust git-logo

crates.io license

๐Ÿงฐ git-kit

cli to help format your git commit messages consistently with less effort via pre-provided templates ๐Ÿคฉ

text - โš ๏ธ break Breaking change that could break a consuming application - ๐Ÿ› bug Fix that resolves an unintended issue - ๐Ÿ“ฆ deps Dependency update or migration to a new dependency - ๐Ÿ“– docs Documentation change - โœจ feature Adds new functionality - ๐Ÿงน refactor Improvement of code / structure without adding new functionality - ๐Ÿงช test Adds or improves the existing tests related to the code base

๐Ÿฅฝ Prerequisites

โณ Install Binary

bash cargo install git-kit

bash git-kit --help

๐ŸŽ๏ธ๐Ÿ’จ Getting Started

๐Ÿ›‚ Checkout command

Creates or checks out an existing git branch and adds a ticket number as context against that branch for future commits.

So now you don't have to remember the ticket number associated to the branch! ๐Ÿ’ก.

When it's time to commit your changes the provided ticket number will be injected into each commit message
thats created on the linked branch for you automatically! ๐Ÿ˜„

bash git-kit checkout my-branch -t TICKET-123

This will create or checkout a branch named my-branch & link TICKET-123 as the ticket number context to inject on any future commits on the branch named my-branch.

Most likely your ticket / issue will only have one branch associated to it in this case you can use the following shorthand ๐Ÿ‘Œ

bash git-kit checkout TICKET-123

This will create or checkout a branch TICKET-123 & link TICKET-123 as the ticket number context to inject on any future commits on the branch TICKET-123.

๐Ÿ›‚ Context command

Create or update context linked to the current checked out branch.

This is handy if you forgot to checkout by the provided git-kit checkout command or if you've made a typo in on the provided ticket number.

Again when it's time to commit your changes the provided ticket number will be injected into each commit message
thats created on the linked branch for you automatically!

bash git-kit context TICKET-123

๐Ÿ›ƒ Commit command

Commits your changes with a formatted message with your ticket number injected if provided from the checkout or the context command.

When committing you can specify a template to use to help describe the changes made within your commit.

text - โš ๏ธ break Breaking change that could break a consuming application - ๐Ÿ› bug Fix that resolves an unintended issue - ๐Ÿ“ฆ deps Dependency update or migration to a new dependency - ๐Ÿ“– docs Documentation change - โœจ feature Adds new functionality - ๐Ÿงน refactor Improvement of code / structure without adding new functionality - ๐Ÿงช test Adds or improves the existing tests related to the code base

bash git-kit commit bug -m "fix"

This will create an editable commit with the following format and will insert branch name will be injected by default into the bug commit template.

[TICKET-123] ๐Ÿ› fix

โš™๏ธ Settings

bash git-kit --help

๐ŸŽฎ Overriding

Planning on providing a way to configure your own templates at a global or repository level.