https://github.com/allancapistrano/gbc
Git Better Commit (gbc) is a simple CLI in Go for writing better commits.
https://github.com/allancapistrano/gbc
cli commit-message golang
Last synced: 9 months ago
JSON representation
Git Better Commit (gbc) is a simple CLI in Go for writing better commits.
- Host: GitHub
- URL: https://github.com/allancapistrano/gbc
- Owner: AllanCapistrano
- License: gpl-3.0
- Created: 2023-07-10T13:53:16.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-30T14:17:31.000Z (over 2 years ago)
- Last Synced: 2025-03-18T06:35:57.397Z (9 months ago)
- Topics: cli, commit-message, golang
- Language: Go
- Homepage:
- Size: 30.2 MB
- Stars: 30
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
Git Better Commit
With emojis
------------
## :book: Description ##
**Git Better Commit (gbc) is a command line interface written in Golang that provides a simple way to write commits following the [Conventional Commits](https://www.conventionalcommits.org/).**
------------
## :computer: How to use
Install gbc
Follow the next steps to install **gbc**:
1. Make sure you already have [curl](https://curl.se/) installed on your machine;
2. Paste this command in your terminal:
```powershell
bash -c "$(curl --fail --show-error --silent --location https://raw.githubusercontent.com/AllanCapistrano/gbc/main/scripts/install.sh)"
```
3. You can check if **gbc** is installed by typing `gbc --version` in your terminal.
Install gbc for Termux
Follow the next steps to install **gbc** for [Termux](https://termux.dev/en/):
1. Make sure you already have [curl](https://curl.se/) installed;
2. Paste this command in your terminal:
```powershell
bash -c "$(curl --fail --show-error --silent --location https://raw.githubusercontent.com/AllanCapistrano/gbc/main/scripts/install-termux.sh)"
```
3. You can check if **gbc** is installed by typing `gbc --version` in your terminal.
Using gbc
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 ` to see a short description and basic example of each **commit type**.
Changing the defaults emojis
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](https://github-emoji-picker.rickstaa.dev/).
###### Make sure to follow the formatting, otherwise the change will not be applied. ######
Allowing commits messages with emojis
You can allow **commit messages with emojis** in the `gbc.conf` file, available in `$HOME/.config/gbc`. Just change the `enableEmojis` to `true`.
###### Make sure to follow the formatting, otherwise the change will not be applied. ######
The result will be something like:
```powershell
🐛 fix: updateUser method
```
Build gbc
To build **gbc** in your machine, you can follow the next steps:
1. Make sure you already have [Go](https://go.dev/) installed;
2. Clone this repository or download the `.zip` file;
3. Open the project directory in your terminal;
4. Install the dependencies:
```powershell
go mod download
```
or
```powershell
go mod tidy
```
5. Then build the project:
```powershell
go build -o bin/gbc main.go
```
If you get [`GLIBC not found`](https://github.com/AllanCapistrano/gbc/issues/13) error, try:
```powershell
CGO_ENABLED=0 go build -o bin/gbc main.go
```
To use the settings file:
1. Create the **gbc** config directory:
```powershell
mkdir -p $HOME/.config/gbc
```
2. Move the `gbc.conf` file into the configuration directory::
```powershell
mv ./config/gbc.conf $HOME/.config/gbc
```
Uninstall gbc
To uninstall **gbc** run the following command in your terminal:
```powershell
bash -c "$(curl --fail --show-error --silent --location https://raw.githubusercontent.com/AllanCapistrano/gbc/main/scripts/uninstall.sh)"
```
Uninstall gbc from Termux
To uninstall **gbc** from [Termux](https://termux.dev/en/) run the following command:
```powershell
bash -c "$(curl --fail --show-error --silent --location https://raw.githubusercontent.com/AllanCapistrano/gbc/main/scripts/uninstall-termux.sh)"
```
------------
## :man_technologist: Author ##
| [](https://github.com/AllanCapistrano) |
| -----------------------------------------------------------------------------------------------------------|
| [Allan Capistrano](https://github.com/AllanCapistrano) |
My socials:
 
 
------------
## :pray: Support ##
**Please :star: this repository if this project is useful or has helped you.**
[](https://www.buymeacoffee.com/allancapistrano)
------------
## :balance_scale: License ##
[GPL-3.0 License](./LICENSE)