Skip to content

Latest commit

 

History

History
167 lines (126 loc) · 5.86 KB

README.md

File metadata and controls

167 lines (126 loc) · 5.86 KB

Git Better Commit

gbc v1.1.0 execution

With emojis

gbc v1.1.0 execution with emojis


📖 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.


💻 How to use

Install gbc

Follow the next steps to install gbc:

  1. Make sure you already have curl installed on your machine;
  2. Paste this command in your terminal:
    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:

  1. Make sure you already have curl installed;
  2. 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)"
  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 <commit type> 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.

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:

🐛 fix: updateUser method

Build gbc

To build gbc in your machine, you can follow the next steps:

  1. Make sure you already have Go installed;
  2. Clone this repository or download the .zip file;
  3. Open the project directory in your terminal;
  4. Install the dependencies:
    go mod download
    or
    go mod tidy
  5. Then build the project:
    go build -o bin/gbc main.go
    If you get GLIBC not found error, try:
    CGO_ENABLED=0 go build -o bin/gbc main.go

To use the settings file:

  1. Create the gbc config directory:
    mkdir -p $HOME/.config/gbc
  2. Move the gbc.conf file into the configuration directory::
    mv ./config/gbc.conf $HOME/.config/gbc

Uninstall 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)"

Uninstall gbc from Termux

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)"

👨‍💻 Author

Allan Capistrano
Allan Capistrano

My socials:

Github icon   Linkedin icon   Email icon


🙏 Support

Please ⭐ this repository if this project is useful or has helped you.

"Buy Me A Coffee"


⚖️ License

GPL-3.0 License