Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sbimochan/smart-commit
Commit with current branch name.
https://github.com/sbimochan/smart-commit
git git-commit git-hooks hacktoberfest shell smart
Last synced: 5 days ago
JSON representation
Commit with current branch name.
- Host: GitHub
- URL: https://github.com/sbimochan/smart-commit
- Owner: sbimochan
- License: mit
- Created: 2019-01-09T08:51:31.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2024-11-04T14:48:58.000Z (2 months ago)
- Last Synced: 2024-12-31T08:11:53.432Z (12 days ago)
- Topics: git, git-commit, git-hooks, hacktoberfest, shell, smart
- Language: Shell
- Homepage:
- Size: 313 KB
- Stars: 93
- Watchers: 2
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nepal - Smart Commit
README
![smart commit logo](assets/logo.svg)
# Smart Commit
Create a commit prefixed with the current branch name.
[![Bats Tests](https://github.com/sbimochan/smart-commit/actions/workflows/bats-tests.yml/badge.svg)](https://github.com/sbimochan/smart-commit/actions/workflows/bats-tests.yml)
[Story](https://www.lftechnology.com/blog/git-workflow-smart-commit/) behind Smart Commit. :zap:
## Installation
Run this command on terminal.
```shell
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`
```shell
$ commit "New feature"# translates to
git commit -m "EF-803: New feature"
```* If your current branch is either of `dev`, `uat`, `qa`, `staging` or `master`
```shell
$ commit "New feature"# translates to
git commit -m "New feature"
```![Smart Commit Preview](assets/smart-commit-preview.gif)
## Skip Branches
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](https://github.com/sbimochan/smart-commit/blob/main/.smart-commit-ignore).
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
```## Contributors
1. [Aviskar KC](https://github.com/aviskarkc10)
2. [Robus Gauli](https://github.com/RobusGauli)
3. [Saroj Shahi](http://sarojshahi.com.np/)
4. [Saugat Acharya](https://github.com/mesaugat)## License
[MIT](LICENSE)