A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/ywkim/gpt-commit below:

ywkim/gpt-commit: Generate conventional commit messages using GPT.

GPT-Commit: Generate Conventional Commit Messages with GPT in Emacs

GPT-Commit is an Emacs package that automatically generates conventional commit messages using the GPT (Generative Pre-trained Transformer) model from OpenAI.

If you have MELPA configured, you can easily install gpt-commit from within Emacs by running:

M-x package-install RET gpt-commit RET

To install this package manually, clone this repository and add the following to your .emacs or init.el:

(add-to-list 'load-path "/path/to/gpt-commit")
(require 'gpt-commit)
  1. Set OpenAI API Key: You will need an API key from OpenAI to use the GPT model. Set the key like this:
(setq gpt-commit-openai-key "YOUR_OPENAI_API_KEY")
  1. Set GPT Model Name (Optional): By default, it uses the gpt-3.5-turbo model. If you wish to use a different model, you can set it like this:
(setq gpt-commit-model-name "YOUR_PREFERRED_MODEL_NAME")
  1. Add Hook: Add the gpt-commit-message function to the git-commit-setup-hook to automatically generate commit messages when the commit message editor starts:
(require 'gpt-commit)
(add-hook 'git-commit-setup-hook 'gpt-commit-message)

Once you have configured gpt-commit, it will automatically generate a commit message using the GPT model whenever you perform a Git commit. You can accept the message by saving and closing the editor, or you can modify the message as needed.

Please note that using the OpenAI API might incur costs, and there might be usage limitations. Be aware of the OpenAI pricing and policy before extensive use.

In our blog post, we've shared real-world examples of how GPT-Commit works with different types of commits. These examples are based on actual commits from the Angular project. Here's a quick overview:

For more detailed examples and comparisons with original commit messages, please check out the blog post.

GPT-Commit offers several benefits to developers:

We're always looking to improve GPT-Commit and we'd love to hear your thoughts. If you've used GPT-Commit, please share your experiences. If you haven't, we encourage you to give it a try and let us know what you think. You can provide feedback by creating an issue in our GitHub repository.

GPT-Commit is licensed under the GNU General Public License v3.0.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4