Skip to content

Latest commit

 

History

92 提交

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

仓库 files navigation

smart commit logo

Smart Commit

Create a commit prefixed with the current branch name.

Bats Tests

Story behind Smart Commit. ⚡

Installation

Run this command on terminal.

sudo curl https://raw.githubusercontent.com/sbimochan/smart-commit/main/commit -o /usr/local/bin/commit && sudo chmod +x /usr/local/bin/commit

Usage

  • If your current branch name is EF-803

    $ commit "新建 feature"
    
    # translates to
    git commit -m "EF-803: 新建 feature"
  • If your current branch is either of dev, uat, qa, staging or master

    $ commit "新建 feature"
    
    # translates to
    git commit -m "新建 feature"

    Smart Commit Preview

Skip 分支

To add a custom branch that you would like to skip, create a .smart-commit-ignore file in your top level directory. A .smart-commit-ignore file looks like this.

Additionally, you might want to add .smart-commit-ignore to your .gitignore file.

Running Tests:

Install Bats if not already installed

sudo apt-get install bats  # For Debian-based systems
# or
brew install bats-core      # For macOS

Run tests

bats tests.bats

贡献者

  1. Aviskar KC
  2. Robus Gauli
  3. Saroj Shahi
  4. Saugat Acharya

License

MIT

关于

Commit with current branch name.

Topics

Resources

Stars

96 stars

关注者

0 watching

复刻s

发布

Used by

贡献者

Languages