Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 1.07 KB

File metadata and controls

34 lines (25 loc) · 1.07 KB

Git Commits With GH Copilot

This project makes it easy to use the github cli to generate commit messages using copilot and conventional commits

Requirements

  1. gh CLI - Installation Instructions
  2. jq CLI

Installation

  1. Once you have installed gh. You will need to authorize with gh auth login --web.

  2. Then clone this repo or copy git-commit.sh in your path.

  3. For easier access add an alias to your shell, example:

    gc() {
      <path-to-repo>/git-commit.sh $@
    }
  4. In another repo add files to be staged with git add .

  5. run gc to generate commit message of your staged files and open up in your editor (fallsback to nvim)

You can also run gc --echo to view the git commit command instead of running to view the message

Note

This script uses jq and your token from gh auth token to make api calls directly to copilot and may break as it is undocumented