go-cc
is a versatile CLI tool written in Go, designed to facilitate the generation and management of conventional commits in your Git repository. It adheres to the Conventional Commit standard for commit messages, enhancing your project's versioning and making your commit history more organized and easier to manage.
- Repository-Level Configuration: Set default conventional commit configurations specific to your repository with ease.
- Interactive Command-Line Prompts: Enjoy a user-friendly experience with interactive command-line prompts for creating conventional commits.
- Automatic Initialization: When no .gocc file is found in the repository, go-cc seamlessly defaults to a predefined configuration for conventional commits.
- Supports Commit Types, Optional Scopes, and Commit Descriptions: Effortlessly define commit types, optional scopes, and commit descriptions tailored to your project.
- Review and Confirm Commit: go-cc provides the option to review and confirm commits before execution, ensuring a final check for changes.
- Seamless Git Workflow Integration: Integrate go-cc seamlessly into your Git workflow, establishing a consistent and standardized approach to conventional commits.
- Easy Versioning: Manage GitHub conventional commits effortlessly and consistently, promoting a streamlined versioning process.
To install go-cc
, you need to have Go installed. You can install the tool using the following steps:
-
Clone the repository:
git clone https://github.com/OscarRG/go-cc.git
-
Change to the project directory:
cd go-cc
-
Build the executable:
make build
-
Install the executable (optional, for system-wide usage):
make install
To use go-cc
, follow these steps:
-
Open your terminal and navigate to your Git repository.
-
Run the
go-cc
command:go-cc
-
You will see a menu with various commit types, each accompanied by an emoji.
-
Use the arrow keys to select the desired commit type and press Enter.
-
You will be prompted to enter an optional scope (leave empty for none) and the commit message description.
-
After providing this information,
go-cc
will generate a conventional commit message and display it for your review. -
Press Enter to confirm and execute the commit, or press 'C' to cancel.
Here's an example of using go-cc
:
$ go-cc
┃ Select the commit type
┃ > ✨ feat
┃ 🐛 fix
┃ 💡 improvement
┃ 📄 docs
┃ 💅 style
┃ 🛠️ refactor
┃ 🎯 perf
┃ 🧪 test
┃ 👷 build
┃ 🔃 ci
┃ 🧹 chore
┃ 🔙 revert
Enter the commit type (feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert): feat
Enter an optional scope (leave empty for none): user-auth
Enter the commit message description: implement user login
Generated commit: feat(user-auth): implement user login
Press Enter to confirm or 'C' to cancel:
If you installed go-cc
system-wide and want to remove it, you can run the following command:
make clean