Git Better Commit (gbc) is a command line interface written in Golang that provides a simple way to write commits following the Conventional Commits.
Follow the next steps to install gbc:
- Make sure you already have curl installed on your machine;
- Paste this command in your terminal:
bash -c "$(curl --fail --show-error --silent --location https://raw.githubusercontent.com/AllanCapistrano/gbc/main/scripts/install.sh)"
- You can check if gbc is installed by typing
gbc --version
in your terminal.
Follow the next steps to install gbc for Termux:
- Make sure you already have curl installed;
- Paste this command in your terminal:
bash -c "$(curl --fail --show-error --silent --location https://raw.githubusercontent.com/AllanCapistrano/gbc/main/scripts/install-termux.sh)"
- You can check if gbc is installed by typing
gbc --version
in your terminal.
Once you have gbc installed, after adding the file(s) to commit, type gbc
in your terminal, select the commit type using the arrows keys, and press enter. After that, enter the commit message you want.
You can type gbc --help
to see the allowed command options or gbc help <commit type>
to see a short description and basic example of each commit type.
You can change the emojis in the gbc.conf
file, available in $HOME/.config/gbc
. Just change the emojis = {...}
. Note that you need to use Emojis Shortcodes, you can get them in Emoji Picker.
You can allow commit messages with emojis in the gbc.conf
file, available in $HOME/.config/gbc
. Just change the enableEmojis
to true
.
The result will be something like:
🐛 fix: updateUser method
To build gbc in your machine, you can follow the next steps:
- Make sure you already have Go installed;
- Clone this repository or download the
.zip
file; - Open the project directory in your terminal;
- Install the dependencies:
or
go mod download
go mod tidy
- Then build the project:
If you get
go build -o bin/gbc main.go
GLIBC not found
error, try:CGO_ENABLED=0 go build -o bin/gbc main.go
To use the settings file:
- Create the gbc config directory:
mkdir -p $HOME/.config/gbc
- Move the
gbc.conf
file into the configuration directory::mv ./config/gbc.conf $HOME/.config/gbc
To uninstall gbc run the following command in your terminal:
bash -c "$(curl --fail --show-error --silent --location https://raw.githubusercontent.com/AllanCapistrano/gbc/main/scripts/uninstall.sh)"
To uninstall gbc from Termux run the following command:
bash -c "$(curl --fail --show-error --silent --location https://raw.githubusercontent.com/AllanCapistrano/gbc/main/scripts/uninstall-termux.sh)"
Allan Capistrano |
Please ⭐ this repository if this project is useful or has helped you.